diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 3f97b6d..f550358 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -74,7 +74,7 @@ jobs: arch: x86_64 target: google_apis_ps16k profile: small_phone - disk-size: 4096M + disk-size: 8192M ram-size: 4096M disable-animations: true script: bash scripts/run_instrumented_tests.sh @@ -116,7 +116,7 @@ jobs: arch: x86_64 target: google_apis_ps16k profile: small_phone - disk-size: 4096M + disk-size: 8192M ram-size: 4096M disable-animations: true script: bash scripts/run_upgrade_test.sh diff --git a/scripts/run_instrumented_tests.sh b/scripts/run_instrumented_tests.sh index 7da104d..0f5d3a6 100755 --- a/scripts/run_instrumented_tests.sh +++ b/scripts/run_instrumented_tests.sh @@ -1,10 +1,18 @@ #!/usr/bin/env bash set -euo pipefail -# Wait for boot (android-emulator-runner already does this, but be safe) -echo "Waiting for device..." +echo "Waiting for device & PackageManager..." adb wait-for-device +for i in {1..30}; do + if adb shell pm path android >/dev/null 2>&1; then + echo "PackageManager service is ready!" + break + fi + echo "Waiting for PackageManager service..." + sleep 2 +done + res=0 ./gradlew connectedOssNoadsDebugAndroidTest -PAPPID=de.szalkowski.activitylauncher.oss --build-cache || res=$? mkdir -p screenshots