name: Emulator smoke test # Installs the release APK on an Android emulator and checks it starts and # reaches the welcome screen. Called by the release workflow on every build; # can be run by hand against the APK of an earlier run. on: workflow_call: workflow_dispatch: inputs: run-id: description: "Run whose 'apk' artifact to test" required: true permissions: contents: read actions: read jobs: smoke-test: runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Download built artifact uses: actions/download-artifact@v4 with: name: apk path: app run-id: ${{ inputs.run-id || github.run_id }} github-token: ${{ github.token }} - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm - name: Launch the app on an emulator uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0 with: api-level: 34 target: google_apis arch: x86_64 disable-animations: true script: .github/scripts/smoke-test.sh app/releaseMarket/app-releaseMarket.apk - name: Upload screen, view tree and logcat if: always() uses: actions/upload-artifact@v4 with: name: smoke-test-output path: smoke-out/ if-no-files-found: ignore