Skip to content

Commit 8cdc8d5

Browse files
committed
ci(android): probe Google APIs DC images
1 parent 412e078 commit 8cdc8d5

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/scripts/mobile-ci/configure-android-device-phase.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ case "$phase" in
2020
emulator_target="default"
2121
;;
2222
dc-api-compose)
23-
script="play_services_version=\$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionCode=\\([0-9]*\\).*/\\1/p' | head -n 1); if [[ -z \"\$play_services_version\" || \"\$play_services_version\" -lt 243100000 ]]; then echo \"::error::Digital Credentials requires Google Play services version 243100000 or newer; found \${play_services_version:-missing}\"; exit 1; fi; ANDROID_TEST_CLASS=id.walt.walletdemo.compose.android.DigitalCredentialSharingE2ETest ./waltid-identity/.github/scripts/mobile-ci/run-android-compose-demo-tests.sh"
23+
script="play_services_version=\$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionCode=\\([0-9]*\\).*/\\1/p' | head -n 1); if [ -z \"\$play_services_version\" ] || [ \"\$play_services_version\" -lt 243100000 ]; then echo \"::error::Digital Credentials requires Google Play services version 243100000 or newer; found \${play_services_version:-missing}\"; exit 1; fi; ANDROID_TEST_CLASS=id.walt.walletdemo.compose.android.DigitalCredentialSharingE2ETest ./waltid-identity/.github/scripts/mobile-ci/run-android-compose-demo-tests.sh"
2424
emulator_options="-no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim"
2525
report_paths="waltid-identity/waltid-applications/waltid-wallet-demo-compose/androidApp/build/outputs/androidTest-results/**/*.xml"
2626
artifact_paths=$'waltid-identity/waltid-applications/waltid-wallet-demo-compose/androidApp/build/reports/androidTests/**\nwaltid-identity/waltid-applications/waltid-wallet-demo-compose/androidApp/build/outputs/androidTest-results/**\nwaltid-identity/waltid-applications/waltid-wallet-demo-compose/androidApp/build/outputs/connected_android_test_additional_output/**'

.github/workflows/android-dc-emulator-probe.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818
matrix:
1919
include:
2020
- api_level: '35'
21-
target: google_apis_playstore
21+
target: google_apis
2222
- api_level: '36'
23-
target: google_apis_playstore
24-
- api_level: '37.0'
2523
target: google_apis
2624
steps:
2725
- name: Boot emulator and verify Play Services
@@ -31,15 +29,16 @@ jobs:
3129
arch: x86_64
3230
target: ${{ matrix.target }}
3331
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
32+
emulator-boot-timeout: 300
3433
disable-animations: true
3534
script: |
36-
set -euo pipefail
35+
set -eu
3736
3837
version_code="$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionCode=\([0-9]*\).*/\1/p' | head -n 1)"
3938
version_name="$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionName=//p' | head -n 1)"
4039
printf 'Google Play services: versionName=%s versionCode=%s\n' "${version_name:-missing}" "${version_code:-missing}"
4140
42-
if [[ -z "$version_code" || "$version_code" -lt 243100000 ]]; then
41+
if [ -z "$version_code" ] || [ "$version_code" -lt 243100000 ]; then
4342
echo "::error::Digital Credentials requires Google Play services version 243100000 or newer"
4443
exit 1
4544
fi

0 commit comments

Comments
 (0)