-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (51 loc) · 1.5 KB
/
Android-CI.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
name: Android-CI
on: pull_request
jobs:
build-and-test:
name: Build, run tests and upload test reports
runs-on: macos-latest
steps:
- name: Checkout current repository in macos' file system
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: 'gradle'
- name: ktlint check
run: ./gradlew ktlintCheck
- name: Unit tests
run: ./gradlew testDebugUnitTest --stacktrace
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: platform/android
api-level: 33
target: google_apis
script: ./gradlew connectedCheck --stacktrace
- name: Upload Reports
uses: actions/upload-artifact@v3
with:
name: reports
path: app/build/reports
generate-apk:
name: Generate and upload debug apk
runs-on: ubuntu-latest
needs:
- build-and-test
steps:
- uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: 'gradle'
- name: Generate debug apk
run: ./gradlew assembleDebug
- name: Upload apk
uses: actions/upload-artifact@v3
with:
name: build-output
path: app/build/outputs/apk/debug/app-debug.apk