straw/.forgejo
Cobb ab344c80bc ci: run the Rust and JVM unit tests before building the APK
The build-apk job ran only ./gradlew :strawApp:assembleDebug, so no
unit test ran before an APK was signed and published. With the Shorts
check planted to never match, that command still built successfully.

Two steps are added after "Auto versionCode from commit count" and
before "Assemble debug APK":

- Rust unit tests (strawcore): cargo test -p strawcore --lib, in
  straw/rust.
- JVM unit tests: ./gradlew :strawApp:testDebugUnitTest, in straw.

Both run under the same ionice/nice as the build step and with the same
CARGO_TARGET_DIR; neither has a secret in its environment. Nothing else
in the workflow changed: same triggers, same build, signer check and
publish steps and conditions. Lint is not added.

Run by hand in the straw-build image, in the workflow's order:
cargo test 11 passed, rc 0; testDebugUnitTest 31 passed, rc 0;
assembleDebug rc 0. With the Shorts check planted to never match, the
JVM step exited 1 (6 of 31 failed); with the Rust parser planted to
never mark a Short, the Rust step exited 101 (5 of 11 failed).

Not run on Forgejo: the workflow only runs on main.
2026-10-22 12:58:53 -07:00
..
workflows ci: run the Rust and JVM unit tests before building the APK 2026-10-22 12:58:53 -07:00