Skip to content

ci: Cache AVD snapshots to speed up Android tests#4030

Merged
jamesarich merged 3 commits into
mainfrom
chore/cache-avd
Dec 17, 2025
Merged

ci: Cache AVD snapshots to speed up Android tests#4030
jamesarich merged 3 commits into
mainfrom
chore/cache-avd

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

cache avd for ui testing

This commit introduces caching for Android Virtual Device (AVD) snapshots in the `reusable-android-test.yml` workflow. By caching the AVD, subsequent test runs can start the emulator more quickly, reducing overall job execution time.

- Added an `actions/cache` step to save and restore the AVD based on its API level.
- A new step creates the AVD and its snapshot only if a cache miss occurs.
- The instrumented test step now leverages the cached AVD.
- Removed `-no-metrics` from `emulator-options`

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This change explicitly sets the architecture to `x86_64` for the Android emulator used in the CI workflow. This ensures that the correct emulator image is used, preventing potential download and build issues with arm64 images on x86-64 runners.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit centralizes the `compileSdk` and `minSdk` versions into a `config.properties` file at the root of the project. This allows for easier management and consistency of SDK versions across the application and CI workflows.

- Updated the `KotlinAndroid.kt` convention plugin to read `COMPILE_SDK` and `MIN_SDK` from `config.properties`.
- Adjusted the merge queue workflow (`merge-queue.yml`) to run tests on API level 32 instead of 26, aligning with the new minimum SDK version.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added the ci Pertains to ci/cd actions or workflows label Dec 17, 2025
@jamesarich jamesarich added the enhancement New feature or request label Dec 17, 2025
@codecov

codecov Bot commented Dec 17, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.56%. Comparing base (81654a0) to head (db7b667).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #4030      +/-   ##
========================================
- Coverage   0.56%   0.56%   -0.01%     
========================================
  Files        405     405              
  Lines      24153   24163      +10     
  Branches    3100    3100              
========================================
  Hits         136     136              
- Misses     23996   24006      +10     
  Partials      21      21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit 17825d3 Dec 17, 2025
9 of 10 checks passed
@jamesarich jamesarich deleted the chore/cache-avd branch December 17, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pertains to ci/cd actions or workflows enhancement New feature or request needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant