Skip to content

Run android member Python and JVM unit tests in CI#15082

Open
rtibblesbot wants to merge 3 commits into
learningequality:developfrom
rtibblesbot:issue-15075-5c6a80
Open

Run android member Python and JVM unit tests in CI#15082
rtibblesbot wants to merge 3 commits into
learningequality:developfrom
rtibblesbot:issue-15075-5c6a80

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

The android member ships a pytest suite and five Robolectric/JUnit4 unit tests that no CI job runs, and the JVM tests fail to build standalone because resource processing pulls in streamlineKolibriTar, which errors when no Kolibri dist tar is staged. This runs both suites in CI and decouples gradle test from the dist tar so the JVM tests build with no tar present.

References

Closes #15075. Depends on #15074 (removes the string-generation resource coupling), merged in #15081.

Reviewer guidance

  • platforms/android/app/build.gradle:194 — the pip install "../tar/extracted" is now guarded by tarFile != null; confirm real APK/AAB builds (which always stage a tar) still install Kolibri from the extracted tar unchanged.
  • .github/workflows/tox.yml:453android_jvm_tests is wired into stage2_required_checks.needs; confirm a failing JVM test flips the Python tests aggregate red and blocks merge.
  • .github/workflows/tox.yml:168 (Provision Chaquopy buildPython) — the uv sync step exists only so Chaquopy's buildPython matches its declared 3.10; check it is not accidentally relied on to stage a tar.

AI usage

Used Claude Code to implement the plan (dependency-group conversion, the build.gradle guard, and the tox.yml matrix row + JVM job) and verify it. Verified with the android pytest suite, a standalone gradle test run on JDK 21 with an empty tar dir, actionlint on the workflow, and spotless on the Groovy edit.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-07-24 07:01 UTC

rtibblesbot and others added 3 commits July 23, 2026 23:52
Convert the kolibri-installer-android member's test and dev extras into
[dependency-groups] so `uv sync --group test --all-packages` installs them,
matching platforms/debian-server and desktop-app. This lets the tox
platform_tests matrix install the android test suite the same way it does
the other members. build stays an extra (installed via --extra build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The JVM unit tests (gradle test) need no built Kolibri dist, but resource
processing pulled in streamlineKolibriTar, which failed on a null tar input
when none was staged. Mark the task's tar input @optional, skip the task
when no tar is present, and skip the Chaquopy pip install of the extracted
tar in that case. Real APK/AAB builds always stage a tar, so they run
unchanged. This lets `gradle test` run standalone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a kolibri-installer-android row to the platform_tests matrix so its
pytest suite runs, and add an android_jvm_tests job that runs `gradle test`
(Robolectric/JUnit4) on JDK 21 with no dist tar staged, proving the suite is
decoupled from streamlineKolibriTar. Wire the JVM job into
stage2_required_checks so a failing android test blocks merge; the Python
leg already flows in via platform_tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added DEV: dev-ops Continuous integration & deployment SIZE: small labels Jul 24, 2026
@rtibblesbot
rtibblesbot marked this pull request as ready for review July 24, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: dev-ops Continuous integration & deployment SIZE: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run the Android platform tests in CI

1 participant