diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bf1756..c265d40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,11 @@ on: branches: [main] merge_group: workflow_dispatch: + inputs: + ui-tests: + description: Run the emulator UI tests + type: boolean + default: false permissions: contents: read @@ -43,6 +48,7 @@ jobs: instrumentation: name: Android emulator UI tests (API ${{ matrix.api }}, shard ${{ matrix.shard }}) + if: inputs.ui-tests runs-on: ubuntu-24.04 timeout-minutes: 60 strategy: @@ -109,6 +115,7 @@ jobs: instrumentation-reports: name: Check combined UI screenshots + if: inputs.ui-tests needs: instrumentation runs-on: ubuntu-24.04 timeout-minutes: 5 diff --git a/README.md b/README.md index 672d2fa..deb2a31 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,10 @@ python3 scripts/check-ui-screenshots.py ``` Gradle downloads the emulator image for the host architecture. The first run can take several minutes. -CI runs the full `androidTest` suite across three parallel runners, without a class or method filter. +CI does not run the UI tests on pull requests or main pushes, because emulator failures were unreliable. +To run them, start the CI workflow manually and select **Run the emulator UI tests**: +`gh workflow run ci.yml -f ui-tests=true`. +A manual run executes the full `androidTest` suite across three parallel runners, without a class or method filter. AndroidJUnitRunner assigns each test to one shard with `numShards=3` and `shardIndex=0`, `1`, or `2`. CI caches the SDK, emulator, and system image. Each runner creates its own managed AVD; snapshots are not shared between hosts. New main pushes cancel older main runs. Pull request runs use separate groups.