ci: align Android unit test task names with KMP conventions [WPB-23848]#3930
ci: align Android unit test task names with KMP conventions [WPB-23848]#3930MohamadJaara wants to merge 5 commits intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3930 +/- ##
===========================================
- Coverage 59.25% 59.24% -0.02%
===========================================
Files 1953 1961 +8
Lines 62652 62849 +197
Branches 6817 6826 +9
===========================================
+ Hits 37125 37234 +109
- Misses 22478 22563 +85
- Partials 3049 3052 +3 see 17 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
| Branch | mo/ci/android-unit-tests-not-running |
| Testbed | ubuntu-latest |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (µs) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot | 940.94 µs |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot | 360,666.98 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot | 1,345,188.87 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot | 21,707.99 µs |
… native library dependencies
|



https://wearezeta.atlassian.net/browse/WPB-23848
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
android-testsjob in the release CI pipeline (build-kalium-unified.yml) was failing when running./gradlew testAndroidHostTest.androidUnitOnlyAffectedTest) was silently running zero Android unit tests because it was looking for atestDebugUnitTesttask that no longer exists.runAllUnitTestsroot task was also silently skipping all Android unit tests for the same reason.Causes
After the migration to Kotlin Multiplatform's Android target, the test task was renamed from
testDebugUnitTesttotestAndroidHostTest. Several places in the build scripts and CI workflows still referenced the old name. Because task lookups usedfindByName(which returns null on miss) rather than failing loudly, this went undetected — the tasks simply ran with no test dependencies.Additionally, the root-level
build.gradle.ktswas resolving subproject tasks eagerly during configuration, before KMP plugins had registered them, causingfindByNameto always return null regardless of the task name.Solutions
OnlyAffectedTestTask.kt: UpdatedANDROID_UNIT_TEST_TASKtest target fromtestDebugUnitTesttotestAndroidHostTestso the PR workflow actually discovers and runs tests.build.gradle.kts:runAndroidUnitTestsroot task that aggregatestestAndroidHostTestacross all subprojects (excluding:core:cryptography).runAndroidUnitTestsandrunAllUnitTeststo usegradle.projectsEvaluatedinstead of eagerfindByName, ensuring tasks are resolved after all subprojects are fully configured.testDebugUnitTesttotestAndroidHostTest.build-kalium-unified.yml: Replaced./gradlew testAndroidHostTest -x :core:cryptography:testAndroidHostTestwith./gradlew runAndroidUnitTests. Addedfetch-depth: 0and the sample build step to match the PR workflow.gradle-android-unit-tests.yml: Updated artifact collection paths fromtestDebugUnitTesttotestAndroidHostTest.test-android-unit-tests-manual.yml(new): Added aworkflow_dispatchworkflow to manually trigger the Android unit tests from any branch for validation.Testing
How to Test
Verify locally that the task resolves correctly:
Should list
testAndroidHostTestfor all subprojects except:core:cryptography.Push the branch and trigger the "Test Android Unit Tests (Manual)" workflow from the Actions tab to validate on CI.
Verify the PR workflow by opening/syncing a PR —
androidUnitOnlyAffectedTestshould now printAdding task: :<module>:testAndroidHostTestlines for affected modules.Notes
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.