Add recent Android API levels (28, 29, 31, 33, 34) to instrumentation CI matrix#2803
Merged
Add recent Android API levels (28, 29, 31, 33, 34) to instrumentation CI matrix#2803
Conversation
Add API levels 28, 29, 31, 33, and 34 (Android 9-14) to the CI emulator matrix. API 29 was previously marked flaky but is worth retrying with current tooling. All use x86_64 + google_apis + stable channel, consistent with the existing modern emulator configuration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n@v4 The old gradle/wrapper-validation-action@v1 was silently failing on all PR runs (works on push-to-main but not on PR merge commits). The modern replacement is gradle/actions/wrapper-validation which is actively maintained by Gradle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ndroid tests Android 9 (API 28) and above refuse to install APKs that target SDK version < 23. The leakcanary-android module was missing an explicit targetSdk in its defaultConfig, causing the test APK to default to targetSdkVersion = minSdkVersion = 14. leakcanary-android-core already had this fix with an explanatory comment. Apply the same to leakcanary-android so it can run on API 28-34 emulators. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When targetSdk >= 33 and notifications are not enabled (fresh emulator), Notifications.canShowNotification launches RequestPermissionActivity with FLAG_ACTIVITY_NEW_TASK to request POST_NOTIFICATIONS permission. This pushes LeakActivity to PAUSED, causing Espresso's onView() to throw NoActivityResumedException. The test is validating the heap import flow, not notifications. Setting showNotifications = false prevents the permission activity from launching so LeakActivity stays in the RESUMED state for the Espresso assertions. The tryAndRestoreConfig wrapper already restores the original config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Based on timing analysis across two full CI runs: - API 28 averaged 652s (~11 min), slowest after API 29 - API 29 averaged 672s (~11 min), consistently the slowest new addition API 31, 33, and 34 provide good modern Android coverage at reasonable cost (568–622s avg). APIs 28 and 29 can be reconsidered later if Android 9/10 coverage becomes a specific need. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
005a522 to
b72effd
Compare
…canning Fixes "Insecure GitHub Actions: Third-Party Action Not Pinned to Commit SHA" flagged by GitHub Advanced Security on PR #2803. Pins to the commit SHA corresponding to v4 while keeping the tag as a comment for readability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
x86_64+google_apis+stablechannel, consistent with existing modern emulator entries (21, 23, 26)Test plan
🤖 Generated with Claude Code