-
Notifications
You must be signed in to change notification settings - Fork 36
64 lines (58 loc) · 1.99 KB
/
android.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
name: Android CI
on :
pull_request :
merge_group :
jobs:
build:
strategy:
fail-fast: false
runs-on : workflow-kotlin-test-runner-ubuntu-4core
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Gradle
run: ./gradlew build
instrumentation-tests:
name: Instrumentation tests
runs-on : workflow-kotlin-test-runner-ubuntu-4core
timeout-minutes: 30
strategy:
# Allow tests to continue on other devices if they fail on one device.
fail-fast: false
matrix:
api-level:
- 21
- 23
- 26
- 29
- 30
steps:
# Setup the runner in the KVM group to enable HW Accleration for the emulator.
# see https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
- name: Enable KVM group perms
shell: bash
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
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
script: ./gradlew connectedCheck --no-build-cache --no-daemon --stacktrace
- name: Upload results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: instrumentation-test-results ${{ matrix.api-level }}
path: ./**/build/reports/androidTests/connected/**