Repository navigation
fix(ci): Run the app module unit tests - #2101
Dev-next-gen wants to merge 1 commit into
Conversation
The "Run unit tests" step calls `./gradlew testDebugUnitTest`, but `:app` declares product flavors, so it has no task by that name. Gradle resolves the name against the only project that does declare it, `:Core:Legacy`, which has no `src/test` at all, so the step reports NO-SOURCE and the job goes green without executing a single test. Use `testStandardDebugUnitTest` instead. `standard` is the default flavor and the `standardDebug` variant is already compiled by the previous step, so the added CI time is small. Fixes Infomaniak#2100
|
|
The three red checks here do not come from this diff. In
What I can add is that the defect is visible in your own CI, not just in the local run I quoted in the description. Run 37455922715 ( Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5. |



Fixes #2100
The last step of
.github/workflows/android.ymlruns::appdeclares adistributionflavor dimension, so it has no task with that name:Invoked from the root, the name is matched against every project of the build, and the only one that declares it is
:Core:Legacy— which has nosrc/testdirectory at all. So the step currently does this:Zero tests executed, job green, no report produced.
DeeplinkParserTestandRootFileTreeCategoryTestare never run by the PR check, and a unit test inapp/can break without the pipeline noticing.With
testStandardDebugUnitTest, same tree, same submodule commit:17 tests run, all green, so this does not turn the pipeline red.
I picked
standardbecause it is the flavor markedisDefaultand becausebuildStandardDebugin the previous step already compiles that variant, so the extra CI time is mostly the test task itself../gradlew test— the command documented inAGENTS.md— would also work, but it additionally compiles thefdroidandpreprodunit-test variants..github/copilot-instructions.mddocuments the same command as the one CI runs, so I updated it too.Measured on Gradle 9.7.1 / JDK 21,
Coreat the submodule commit pinned onmain.Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.
Nothing this pipeline produces is submitted without human approval. The entire pull request — the code change, the documentation updates and this description — was reviewed by a human before the pipeline was allowed to submit it.