Skip to content

Commit 7d4a80b

Browse files
Migrate in-app E2E job to ubuntu-latest with KVM acceleration
The previous CI run on macos-15-intel (2 cores / 3GB AVD on HVF) starved system_server during cold boot. Logcat shows continuous ANRs in systemui, nexuslauncher, gms.persistent, googlequicksearchbox, com.android.phone, com.google.android.as, keychain, permissioncontroller — all before and during the test. UiAutomator's wait then timed out with current package = 'android' (a system dialog) sitting on top of MainActivity, so btnInAppMessages was unreachable. Switching to ubuntu-latest with KVM acceleration gives the AVD real hardware virtualization on a 4 vCPU / 16GB host, stopping the ANR storm and letting the test see MainActivity within its 30s wait. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 46709d8 commit 7d4a80b

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/inapp-e2e-tests.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,27 @@ on:
1010
jobs:
1111
inapp-e2e-tests:
1212
name: In-App Message E2E Tests
13-
runs-on: macos-15-intel
14-
13+
# SDK-170: macOS Intel runners (2 cores / 3GB AVD on HVF) starved system_server during
14+
# cold boot and produced cascading ANRs (systemui / nexuslauncher / gms / phone …),
15+
# leaving a system dialog on top of MainActivity so UiAutomator could not find the
16+
# in-app button. Ubuntu runners with KVM acceleration and 4 vCPU / 16GB stop the storm.
17+
runs-on: ubuntu-latest
18+
1519
strategy:
1620
matrix:
1721
api-level: [34] # MVP testing on most relevant API level only
18-
22+
1923
steps:
2024
- name: Checkout code
2125
uses: actions/checkout@v4
22-
26+
27+
- name: Enable KVM device permissions
28+
run: |
29+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
30+
| sudo tee /etc/udev/rules.d/99-kvm.rules
31+
sudo udevadm control --reload-rules
32+
sudo udevadm trigger --name-match=kvm
33+
2334
- name: Set up JDK 17
2435
uses: actions/setup-java@v4
2536
with:
@@ -69,15 +80,15 @@ jobs:
6980
./gradlew :integration-tests:assembleDebug :integration-tests:assembleDebugAndroidTest --no-daemon &
7081
echo "Build started in background..."
7182
72-
- name: Run UI Tests with Emulator (Intel / x86_64)
83+
- name: Run UI Tests with Emulator (KVM / x86_64)
7384
uses: ReactiveCircus/android-emulator-runner@v2
7485
with:
7586
api-level: ${{ matrix.api-level }}
7687
target: google_apis
7788
arch: x86_64
7889
profile: pixel_6
79-
cores: 2
80-
ram-size: 3072M
90+
cores: 4
91+
ram-size: 4096M
8192
heap-size: 576M
8293
force-avd-creation: true
8394
disable-animations: true

0 commit comments

Comments
 (0)