-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (104 loc) · 3.11 KB
/
main.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Developer CI
on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup-workflow:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Project checkout
uses: actions/checkout@v4
- name: Setup gradle build
uses: ./.github/actions/setup-gradle-build
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
code-quality:
needs: [setup-workflow]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Project checkout
uses: actions/checkout@v4
- name: Setup gradle build
uses: ./.github/actions/setup-gradle-build
- name: Run detekt
run: ./gradlew detekt
unit-test:
needs: [code-quality]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Project checkout
uses: actions/checkout@v4
- name: Setup gradle build
uses: ./.github/actions/setup-gradle-build
- name: Run unit tests
run: ./gradlew testDebug --stacktrace
android-test:
if: ${{ vars.ANDROID_TEST_EXPERIMENTAL == 'true' }}
needs: [code-quality]
runs-on: macos-latest
timeout-minutes: 55
continue-on-error: true
strategy:
matrix:
device-config: [ "pixel6api30aospatd" ]
steps:
- name: Project checkout
uses: actions/checkout@v4
- name: Setup gradle build
uses: ./.github/actions/setup-gradle-build
- name: Setup android sdk
uses: android-actions/setup-android@v3
- name: Run android test with GMD
run: |
echo "::group::Cleaning managed devices"
./gradlew cleanManagedDevices --unused-only
echo "::endgroup::"
echo "::group::Running androidTest"
./gradlew ${{ matrix.device-config }}DebugAndroidTest \
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" \
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true \
--stacktrace
echo "::endgroup::"
build-apk:
needs: [code-quality]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Project checkout
uses: actions/checkout@v4
- name: Setup gradle build
uses: ./.github/actions/setup-gradle-build
- name: Setup gradle build
uses: gradle/actions/setup-gradle@v3
- name: Build apks
run: ./gradlew app:assemble
- name: Upload debug APK
if: success()
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: app/build/outputs/apk/debug
- name: Upload release APK
if: success()
uses: actions/upload-artifact@v4
with:
name: release-apk
path: app/build/outputs/apk/release
- name: Upload R8 mappings
if: success()
uses: actions/upload-artifact@v4
with:
name: release-mapping
path: app/build/outputs/mapping/release