Skip to content

Commit 429e5b3

Browse files
committed
Update CI workflow to use Ubuntu for Android E2E tests and add KVM setup
1 parent 9d2add1 commit 429e5b3

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/new.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ on: push
44

55
jobs:
66
e2e-android:
7-
runs-on: macos-latest
7+
runs-on: ubuntu-latest
88

99
steps:
1010
- name: Checkout repository
1111
uses: actions/checkout@v4
1212

13+
- name: Free Disk Space (Ubuntu)
14+
uses: jlumbroso/free-disk-space@main
15+
with:
16+
tool-cache: true
17+
android: false
18+
1319
- name: Setup
1420
uses: ./.github/actions/setup
1521

@@ -50,24 +56,36 @@ jobs:
5056
yarn detox build --configuration android.emu.release
5157
cd ..
5258
59+
- name: Enable KVM
60+
run: |
61+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
62+
sudo udevadm control --reload-rules
63+
sudo udevadm trigger --name-match=kvm
64+
5365
- name: Get device name
5466
id: device
5567
run: node -e "console.log('AVD_NAME=' + require('./example/.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT
5668

5769
- name: Detox test
5870
uses: reactivecircus/android-emulator-runner@v2
71+
env:
72+
ITBL_API_KEY: ${{secrets.ITERABLE_API_KEY}}
73+
ITBL_ID: ${{secrets.ITBL_ID}}
5974
with:
6075
api-level: 31
6176
arch: x86_64
6277
avd-name: ${{ steps.device.outputs.AVD_NAME }}
78+
force-avd-creation: false
79+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
80+
disable-animations: false
6381
script: |
6482
cd example
6583
yarn detox test --configuration android.emu.release --headless --record-logs all
6684
cd ..
6785
6886
- name: Upload artifacts
6987
if: failure()
70-
uses: actions/upload-artifact@v3
88+
uses: actions/upload-artifact@v4
7189
with:
7290
name: detox-artifacts
7391
path: example/artifacts

0 commit comments

Comments
 (0)