Skip to content

Commit 5866515

Browse files
committed
ci: Run tests on emulator
1 parent 98a9be1 commit 5866515

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,39 @@ jobs:
6565
with:
6666
path: library/build/outputs/aar/*.aar
6767

68+
- name: Enable KVM group perms
69+
run: |
70+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
71+
sudo udevadm control --reload-rules
72+
sudo udevadm trigger --name-match=kvm
73+
74+
- name: AVD cache
75+
uses: actions/cache@v4
76+
id: avd-cache
77+
with:
78+
path: |
79+
~/.android/avd/*
80+
~/.android/adb*
81+
key: avd-29
82+
83+
- name: create AVD and generate snapshot for caching
84+
if: steps.avd-cache.outputs.cache-hit != 'true'
85+
uses: reactivecircus/android-emulator-runner@v2
86+
with:
87+
api-level: 29
88+
force-avd-creation: false
89+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
90+
disable-animations: false
91+
script: echo "Generated AVD snapshot for caching."
92+
93+
- name: Android Emulator Runner
94+
uses: ReactiveCircus/android-emulator-runner@v2.33.0
95+
with:
96+
force-avd-creation: false
97+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
98+
disable-animations: true
99+
api-level: 29
100+
ndk: 26.3.11579264
101+
script: ./gradlew connectedCheck
102+
103+

0 commit comments

Comments
 (0)