Skip to content

ci(agent): enable Gradle Managed Device instrumentation tests in CI - #68

Merged
mingweiliao merged 1 commit into
android:mainfrom
mingweiliao:ci-integration-test
Oct 30, 2026
Merged

mingweiliao merged 1 commit into
android:mainfrom
mingweiliao:ci-integration-test

Conversation

@mingweiliao

@mingweiliao mingweiliao commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Gradle Managed Device (GMD) instrumentation tests to the Agent CI workflow (.github/workflows/agent.yaml) and updates the managed device target to API 37.

Changes

  • agent/app/build.gradle.kts:
    • Updates the GMD definition from pixel7Api36 (apiLevel = 36) to pixel7Api37 (apiLevel = 37). FakeAppFunctionService declares <property android:name="android.app.appfunctions.v2" ... /> (tools:targetApi="37"), which requires an API 37 system image for AppFunctionManager to index the v2 XML metadata.
  • .github/workflows/agent.yaml:
    • Switches runs-on from macos-26 (Apple Silicon M1 VM without nested virtualization support) to ubuntu-latest and configures /dev/kvm permissions, matching other android/* sample repositories.
    • Adds Setup GMD (:app:pixel7Api37Setup) and Run instrumentation tests (:app:pixel7Api37StandardDebugAndroidTest) steps after Run screenshot tests and before Build Debug and Release APKs / Upload Agent APKs.

Testing

  • Ran ./gradlew :app:pixel7Api37Setup :app:pixel7Api37StandardDebugAndroidTest locally:
    • GetAppFunctionsUseCaseTest — PASSED
    • GetAppFunctionStatesUseCaseTest — PASSED
    • GeminiProviderImplIntegrationTest (9 tests) — SKIPPED as expected when GEMINI_API_KEY is not a live key (via assumeTrue).

@mingweiliao
mingweiliao requested a review from a team as a code owner October 30, 2026 10:20
- Update GMD configuration in agent/app/build.gradle.kts from pixel7Api36 to pixel7Api37 so AppFunctionManager indexes android.app.appfunctions.v2 XML metadata on API 37.
- Wait for fakeFunction to be indexed via 'cmd app_function list-app-functions' in @before of GetAppFunctionsUseCaseTest and GetAppFunctionStatesUseCaseTest.
- Switch Agent CI workflow runner to ubuntu-latest and enable KVM permissions to support hardware-accelerated Android emulators.
- Add pixel7Api37Setup and pixel7Api37StandardDebugAndroidTest steps to .github/workflows/agent.yaml before assembling release APKs.
@mingweiliao
mingweiliao merged commit 0bb367a into android:main Oct 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant