-
Notifications
You must be signed in to change notification settings - Fork 8
106 lines (90 loc) · 2.44 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build and check
on:
push:
branches:
- develop
- master
- release/*
pull_request:
schedule:
- cron: '11 6 3 * *'
jobs:
buildJob:
name: Build
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Assemble Library
run: ./gradlew library:assemble
lintJob:
name: Lint
runs-on: macos-latest
needs: [buildJob]
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Lint
run: ./gradlew library:lint
- name: Upload lint results artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: lint-results-debug
path: library/build/reports/lint-results-debug.html
retention-days: 5
unitTestJob:
name: Unit Test
runs-on: macos-latest
needs: [buildJob]
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Unit Test
run: ./gradlew library:test
- name: Upload unit test results artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: unit-test-results-debug
path: library/build/reports/tests/testDebugUnitTest/
retention-days: 5
intrTestJob:
name: Instrumentation Test
runs-on: macos-latest
needs: [buildJob]
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Run instrumentation tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew library:connectedAndroidTest
- name: Upload instrumentation test results artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: instrumentation-test-results-debug
path: library/build/reports/androidTests/connected/
retention-days: 5