Skip to content

Commit 4ad76a5

Browse files
committed
fix: emulator
1 parent 0caf723 commit 4ad76a5

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,36 @@ jobs:
8080
run: |
8181
pnpm nx run @react-native-harness/${{ matrix.app }}:build-android
8282
83-
- name: Install Android app
84-
working-directory: apps/${{ matrix.app }}
83+
- name: Enable KVM group perms
8584
run: |
86-
pnpm nx run @react-native-harness/${{ matrix.app }}:install-android
85+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
86+
sudo udevadm control --reload-rules
87+
sudo udevadm trigger --name-match=kvm
88+
ls /dev/kvm
89+
90+
- name: AVD cache
91+
uses: actions/cache@v4
92+
id: avd-cache
93+
with:
94+
path: |
95+
~/.android/avd/*
96+
~/.android/adb*
97+
key: avd-${{ matrix.app }}
98+
8799

88100
- name: Run E2E tests
89101
uses: reactivecircus/android-emulator-runner@v2
90102
with:
103+
working-directory: apps/${{ matrix.app }}/android
91104
api-level: 35
92105
arch: x86_64
93-
profile: Pixel_8_API_35
94-
script: pnpm nx run @react-native-harness/${{ matrix.app }}:start --args='test android-native'
106+
profile: pixel_8
107+
disk-size: 1G
108+
heap-size: 1G
109+
force-avd-creation: false
110+
avd-name: Pixel_8_API_35
111+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
112+
script: ../../../scripts/run-tests-on-android.sh ${{ matrix.app }} 'test android-native'
95113

96114
- name: Upload test results
97115
if: always()

0 commit comments

Comments
 (0)