-
Notifications
You must be signed in to change notification settings - Fork 10
63 lines (61 loc) · 1.92 KB
/
kotlin.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
name: Kotlin
on:
pull_request:
branches: [ main ]
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [21, 29]
steps:
- uses: actions/checkout@v1
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Unit tests
run: ./run_tests.sh
- name: Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot-save -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./run_instrumented_tests.sh && ./verify_coverage.sh
- name: Compress Reports
continue-on-error: true
if: ${{ always() }}
run: ./zip_reports.sh
- name: Upload Reports
continue-on-error: true
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: Reports API ${{ matrix.api-level }}
path: reports/*.zip
# Create APK. To download APK file, click on Artifacts within the Actions tab
apk:
needs: test
name: Generate APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace --warning-mode all
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: mobile
path: mobile/build/outputs/apk/debug/mobile-debug.apk