-
Notifications
You must be signed in to change notification settings - Fork 13
72 lines (56 loc) · 2.1 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
61
62
63
64
65
66
67
68
69
70
71
72
name: Android CI
on: [ push ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit_tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Project Checkout
uses: actions/checkout@v4
- name: Setup Android Build
uses: ./.github/actions/setup-android-build
- name: Run Tests
run: ./gradlew testDebugUnitTest testPinboardapiDebugUnitTest --stacktrace
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Project Checkout
uses: actions/checkout@v4
- name: Setup Android Build
uses: ./.github/actions/setup-android-build
- name: Build
run: ./gradlew assemblePinboardapi --stacktrace
- name: Upload Pinboard API APK
if: success()
uses: actions/upload-artifact@v4
with:
path: app/build/outputs/apk/pinboardapi/debug/*.apk
instrumented_tests:
name: Instrumented Tests
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ unit_tests, build ]
steps:
- name: Enable KVM group perms
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
ls /dev/kvm
- name: Project Checkout
uses: actions/checkout@v4
- name: Setup Android Build
uses: ./.github/actions/setup-android-build
- name: Install GMD image
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;arm64-v8a"
- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
- name: Run instrumented tests
run: ./gradlew pixel8api34PinboardapiDebugAndroidTest
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1