Skip to content

[WAL-752] feat(mobile): add native mobile Digital Credentials API presentation #2

[WAL-752] feat(mobile): add native mobile Digital Credentials API presentation

[WAL-752] feat(mobile): add native mobile Digital Credentials API presentation #2

name: Android DC emulator probe
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/android-dc-emulator-probe.yml'
permissions:
contents: read
jobs:
probe:
name: ${{ matrix.api_level }}-${{ matrix.target }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- api_level: '35'
target: google_apis
- api_level: '36'
target: google_apis
steps:
- name: Boot emulator and verify Play Services
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api_level }}
arch: x86_64
target: ${{ matrix.target }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
emulator-boot-timeout: 300
disable-animations: true
script: |
set -eu
version_code="$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionCode=\([0-9]*\).*/\1/p' | head -n 1)"
version_name="$(adb shell dumpsys package com.google.android.gms | sed -n 's/.*versionName=//p' | head -n 1)"
printf 'Google Play services: versionName=%s versionCode=%s\n' "${version_name:-missing}" "${version_code:-missing}"
if [ -z "$version_code" ] || [ "$version_code" -lt 243100000 ]; then
echo "::error::Digital Credentials requires Google Play services version 243100000 or newer"
exit 1
fi