Repository navigation
perf: expect the persistent session on Android snapshot-raw #12884
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review, converted_to_draft] | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'website/**' | |
| - 'README.md' | |
| - 'AGENTS.md' | |
| - 'CONTEXT.md' | |
| - 'CONTRIBUTING.md' | |
| - 'LICENSE' | |
| - 'SECURITY.md' | |
| - '.github/actions/build-docs/action.yml' | |
| - '.github/workflows/deploy.yml' | |
| - '.github/workflows/pr-preview.yml' | |
| - '.github/workflows/pr-preview-cleanup.yml' | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| smoke-android: | |
| name: Smoke Tests | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 80 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup toolchain | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Fetch the PR base for Android smoke selection | |
| if: github.event_name == 'pull_request' | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| run: git fetch origin "$BASE_SHA" --depth=1 || echo "Base fetch failed; Android smoke selection will fail open." | |
| - name: Select Android smoke tests | |
| id: impact | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| run: node --experimental-strip-types scripts/device-lane-impact.ts replay-android android-helpers | |
| - name: Setup Android replay host | |
| if: steps.impact.outputs.run != 'false' | |
| id: android-replay-host | |
| uses: ./.github/actions/setup-android-replay-host | |
| with: | |
| package-helpers: 'true' | |
| - name: Restore fixture APK | |
| if: steps.impact.outputs.run != 'false' | |
| id: fixture-app | |
| uses: ./.github/actions/setup-fixture-app | |
| with: | |
| platform: android | |
| install: 'false' | |
| wait-for-artifact-seconds: '1800' | |
| - name: Report fixture cache source | |
| if: steps.impact.outputs.run != 'false' | |
| run: echo "Android fixture APK source=${{ steps.fixture-app.outputs.source }}" | |
| - name: Run Android emulator catalog coverage contract | |
| if: steps.impact.outputs.run != 'false' | |
| run: node --experimental-strip-types scripts/node-test-tmpdir.ts --test test/integration/smoke-android-emulator-coverage.test.ts | |
| - name: Run Android smoke checks | |
| if: steps.impact.outputs.run != 'false' | |
| uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0 | |
| with: | |
| api-level: 36 | |
| arch: x86_64 | |
| profile: pixel_7 | |
| target: google_apis_playstore | |
| emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -no-metrics | |
| script: | | |
| set -eu | |
| ANDROID_SERIAL="$(adb devices | awk 'NR > 1 && $2 == "device" { print $1; exit }')" | |
| test -n "$ANDROID_SERIAL" | |
| pnpm gate build | |
| pnpm clean:daemon | |
| AGENT_DEVICE_ANDROID_E2E=1 AGENT_DEVICE_ANDROID_E2E_TIER=smoke AGENT_DEVICE_ANDROID_SERIAL="$ANDROID_SERIAL" AGENT_DEVICE_FIXTURE_APP_PATH="${{ steps.fixture-app.outputs.apk-path }}" AGENT_DEVICE_FIXTURE_APP_ID="${{ steps.fixture-app.outputs.app-id }}" node --experimental-strip-types scripts/node-test-tmpdir.ts --test test/integration/smoke-android-emulator.test.ts | |
| node --experimental-strip-types src/bin.ts test test/integration/replays/android/emulator/01-settings.ad --retries 2 --report-junit test/artifacts/replays-android-smoke.junit.xml | |
| - name: Upload Android artifacts | |
| if: always() && steps.impact.outputs.run != 'false' | |
| uses: ./.github/actions/upload-agent-device-artifacts | |
| with: | |
| artifact-name: android-artifacts | |
| agent-state-dir: ${{ steps.android-replay-host.outputs.agent-state-dir }} |