ci: Cache AVD snapshots to speed up Android tests#4030
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cache avd for ui testing