Skip to content

Task names mismatched due to KMP & flavors - #49

Closed
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue48-20260704055949
Closed

Task names mismatched due to KMP & flavors#49
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue48-20260704055949

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 4, 2026

Copy link
Copy Markdown

Summary

Root cause: The CI commands used assembleDebugAndroidTest and connectedDebugAndroidTest — standard AGP naming patterns — but these only matched the :core module. Both :app and :shared were silently skipped because:

  1. :shared uses KMP's withDeviceTestBuilder, which generates tasks named *AndroidDeviceTest (not *DebugAndroidTest). So connectedDebugAndroidTest never matched shared:connectedAndroidDeviceTest.

  2. :app has product flavors (stable, unstable), so the variant-specific tasks are connectedStableDebugAndroidTest and connectedUnstableDebugAndroidTest. The generic connectedDebugAndroidTest doesn't aggregate them.

Changes made (2 files):

  • .github/scripts/connected-android-test.sh: Replaced ./gradlew connectedDebugAndroidTest with explicit task names for all 4 variants across 3 modules. Also added core to the report archiving.

  • .github/workflows/connected-android-test.yml: Replaced ./gradlew assembleDebugAndroidTest with explicit assembly tasks for all modules.

Verified: all test APKs compile successfully, and all connected test tasks resolve correctly in the dry-run.

Closes #48

New%20session%20-%202026-07-04T05%3A59%3A49.359Z
opencode session  |  github run

Co-authored-by: 283375 <283375@users.noreply.github.com>
@283375

283375 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

/opencode The check for API 24 failed with a long-lasting issue. Try to fetch the actions results directly. If cannot, here's the key logs:

xyz.sevive.arcaeaoffline.ui.components.DecimalStepperTextFieldTest > allows_negative_input[emulator-5554 - 7.0] FAILED 
	java.lang.IllegalStateException: No compose hierarchies found in the app. Possible reasons include: (1) the Activity that calls setContent did not launch; (2) setContent was not called; (3) setContent was called before the ComposeTestRule ran. If setContent is called by the Activity, make sure the Activity is launched after the ComposeTestRule runs
	at androidx.compose.ui.test.TestOwnerKt.getAllSemanticsNodes(TestOwner.kt:106)
Tests on emulator-5554 - 7.0 failed: There was 1 failure(s).

The tests was proved to be working on another simulator, so the problem should be inside the CI. Search Internet and codebase for the action step's precise behavior and locate the root cause. If the problem still exist after 5 fixing attempts, terminate the session and report the findings you've got.

Always try executing commands rather than thinking to confirm actual behaviors. Always refer to the latest codebase rather than recalling your memories.

@283375 283375 mentioned this pull request Aug 29, 2026
283375 added a commit that referenced this pull request Aug 29, 2026
'connectedDebugAndroidTest' only matched :core: — :app: has product
flavors and :shared: is a KMP android target, so their device-test
tasks have different names and never ran on CI (#48, #49).

- app: connectedUnstableDebugAndroidTest (unstable flavor only for now;
  tests are identical across flavors, and unstable is the main line)
- core: connectedDebugAndroidTest
- shared: connectedAndroidDeviceTest (no test sources yet, kept so
  future shared device tests run automatically)

Build step assembles the same explicit set before the emulator starts.
@283375

283375 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #60 (commit 2432460 on ci/fix-connected-tests).

The explicit per-module task list is now on the new PR with adjustments:

  • app: runs only the unstable flavor (tests are identical across flavors)
  • shared:connectedAndroidDeviceTest confirmed working — its 22 Compose UI tests (from commonTest) now actually run on CI, resolving (CI) Connected Android Tests Not Running shared Tests #48 as well
  • Verified on CI: API 36 fully green; API 24 passes all 29 tests in portrait (landscape failure is the pre-existing API 24 emulator install flakiness, being addressed separately in ci: fix connected tests #60 step 4)

@283375 283375 closed this Aug 29, 2026
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.

(CI) Connected Android Tests Not Running shared Tests

1 participant