Skip to content

Commit cbee0c5

Browse files
committed
fix: prevent Android emulator from terminating before tests
1 parent 6bb2984 commit cbee0c5

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/CI.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,24 @@ jobs:
2727
- name: Grant execute permission for gradlew
2828
run: chmod +x gradlew
2929

30-
- name: Setup Android emulator
30+
- name: Enable KVM
31+
run: |
32+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666"' | sudo tee /etc/udev/rules.d/99-kvm.rules
33+
sudo udevadm control --reload-rules
34+
sudo udevadm trigger
35+
36+
- name: Run unit tests and lint check
37+
run: ./gradlew --no-daemon --stacktrace --continue test lintDebug
38+
39+
- name: Run instrumented tests on emulator
3140
uses: reactivecircus/android-emulator-runner@v2
3241
with:
3342
api-level: 33
34-
script: |
35-
echo "Emulator started!"
43+
arch: x86_64
44+
script: ./gradlew --no-daemon --stacktrace --continue connectedAndroidTest
3645

37-
- name: Run tests, lint check and build
38-
run: ./gradlew test connectedAndroidTest lintDebug assembleDebug
46+
- name: Assemble debug build
47+
run: ./gradlew --no-daemon --stacktrace assembleDebug
3948

4049
- name: Upload lint report artifact
4150
if: always()

0 commit comments

Comments
 (0)