File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,11 +47,17 @@ jobs:
4747 profile : Nexus 6
4848 disable-animations : true
4949 script : |
50- echo "Emulator setup complete"
50+ echo "Waiting for device to be ready..."
51+ adb wait-for-device
52+ echo "Device is ready"
5153 adb devices
54+ # Wait for boot to complete
55+ adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
56+ # Disable animations
5257 adb shell settings put global window_animation_scale 0.0
5358 adb shell settings put global transition_animation_scale 0.0
5459 adb shell settings put global animator_duration_scale 0.0
60+ echo "Emulator is ready"
5561
5662 - name : Make gradlew executable
5763 run : chmod +x ./gradlew
6167 working-directory : ./android
6268 run : ./gradlew test
6369
70+ - name : Verify emulator is ready
71+ working-directory : ./android
72+ run : |
73+ adb wait-for-device
74+ adb shell getprop sys.boot_completed | grep -q 1
75+
6476 - name : Run instrumentation tests
6577 working-directory : ./android
66- run : ./gradlew connectedAndroidTest
78+ run : |
79+ ./gradlew connectedDebugAndroidTest
6780
6881 - name : Upload test results
6982 if : always()
You can’t perform that action at this time.
0 commit comments