Skip to content

Commit ac46c22

Browse files
committed
fix(ci): fix instrumented tests
1 parent 9782b69 commit ac46c22

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
name: Run tests
55

6-
on: [push]
6+
on: [ push ]
77

88
jobs:
99
unit-tests:
@@ -18,20 +18,43 @@ jobs:
1818
run: chmod +x ./gradlew
1919
- name: Run unit test
2020
run: ./gradlew test
21+
- name: Upload test reports
22+
if: ${{ !cancelled() }}
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: test-reports-${{ matrix.api-level }}
26+
path: '**/build/reports/tests'
2127
instrumented-tests:
22-
runs-on: macos-latest
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 55
30+
strategy:
31+
matrix:
32+
api-level: [ 26, 34 ]
2333
steps:
34+
- name: Enable KVM group perms
35+
run: |
36+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
37+
sudo udevadm control --reload-rules
38+
sudo udevadm trigger --name-match=kvm
39+
ls /dev/kvm
2440
- uses: actions/checkout@v4
25-
- uses: actions/setup-java@v3
41+
- uses: actions/setup-java@v4
2642
with:
2743
java-version: '17'
28-
distribution: 'adopt'
44+
distribution: 'zulu'
2945
- name: Make gradlew executable
3046
run: chmod +x ./gradlew
3147
- name: Run Android Tests
3248
uses: reactivecircus/android-emulator-runner@v2
3349
with:
34-
api-level: 30
50+
api-level: ${{ matrix.api-level }}
3551
arch: x86_64
52+
disable-animations: true
3653
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect
37-
script: ./gradlew connectedCheck
54+
script: ./gradlew connectedCheck
55+
- name: Upload test reports
56+
if: ${{ !cancelled() }}
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: test-reports-${{ matrix.api-level }}
60+
path: '**/build/reports/androidTests'

0 commit comments

Comments
 (0)