Skip to content

Commit 356c8d5

Browse files
committed
ci: replace docker with android emulator runner action
1 parent f53c8aa commit 356c8d5

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/ui-tests.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ jobs:
4040
run: chmod +x gradlew
4141

4242
- name: Build for debug with gradle
43-
run: ./gradlew assembleDebug assembleAndroidTest
43+
run: |
44+
./gradlew assembleDebug assembleAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.output.enable=true
45+
# Verify APKs were built for x86_64
46+
ls -la app/build/outputs/apk/debug/
47+
ls -la app/build/outputs/apk/androidTest/debug/
4448
4549
- name: Enable KVM
4650
run: |
@@ -63,6 +67,7 @@ jobs:
6367
with:
6468
api-level: 29
6569
arch: x86_64
70+
profile: pixel_4
6671
force-avd-creation: false
6772
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
6873
disable-animations: false
@@ -72,13 +77,25 @@ jobs:
7277
uses: reactivecircus/android-emulator-runner@v2
7378
with:
7479
api-level: 29
75-
arch: x86_64
80+
arch: arm64-v8a
81+
profile: pixel_4
7682
force-avd-creation: false
7783
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
7884
disable-animations: true
7985
script: |
80-
./gradlew installDebug
81-
./gradlew connectedDebugAndroidTest
86+
# Wait for emulator to be fully ready
87+
adb wait-for-device
88+
while [ "$(adb shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do
89+
echo "Waiting for boot to complete..."
90+
sleep 10
91+
done
92+
93+
# Verify emulator architecture
94+
adb shell getprop ro.product.cpu.abi
95+
96+
# Install and run tests
97+
./gradlew installDebug -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.output.enable=true
98+
./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.output.enable=true
8299
83100
- name: Upload UI test report
84101
if: always()
@@ -88,4 +105,6 @@ jobs:
88105
path: |
89106
app/build/reports/androidTests/connected/**/*
90107
app/build/outputs/androidTest-results/connected/**/*
108+
app/build/outputs/androidTest-results/**/*
109+
app/build/outputs/**/androidTest-results/**/*
91110
if-no-files-found: warn

0 commit comments

Comments
 (0)