Skip to content

Run JVM and Android unit tests on pull requests - #28

Merged
contextablemark merged 3 commits into
mainfrom
ci/pr-tests
Oct 17, 2026
Merged

contextablemark merged 3 commits into
mainfrom
ci/pr-tests

Conversation

@contextablemark

@contextablemark contextablemark commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Why

Tests only ran in publish.yml, right before a release. A regression on a PR (like the failing test originally in #22) wouldn't surface until publish time.

What

New .github/workflows/test.yml:

  • Triggers: pull requests targeting main, and pushes to main.
  • Runs ./gradlew :a2ui-4k:jvmTest :a2ui-4k:testDebugUnitTest on ubuntu-latest. Neither needs macOS, and Linux runners are faster and cheaper.
  • Setup matches publish.yml: JDK 21 (Temurin), Android SDK with platform and build-tools 36.
  • Uses gradle/actions/setup-gradle@v4 for Gradle caching. That's the current name of gradle-build-action, which publish.yml still uses.
  • Uploads the HTML test reports as an artifact when a run fails (kept 7 days).
  • Cancels superseded runs on the same branch, with a read-only contents permission.

iOS and JS tests stay in publish.yml's allTests. They need a macOS runner and a browser, respectively.

Android SDK setup fix (both workflows)

android-actions/setup-android@v3 installs the obsolete tools package by default. That package no longer exists in the SDK repository, so the setup step now fails. This PR's first run hit it. Both test.yml and publish.yml now pass packages: "platform-tools platforms;android-36 build-tools;36.0.0". In publish.yml this replaces the separate sdkmanager --install step. The existing license and verify steps are unchanged. publish.yml last succeeded on 2026-05-08, before the package was removed, so without this fix the next publish would fail at SDK setup.

Testing

🤖 Generated with Claude Code

contextablemark and others added 3 commits October 17, 2026 15:24
Until now tests only ran in publish.yml, right before a release. Add a
workflow that runs :a2ui-4k:jvmTest and :a2ui-4k:testDebugUnitTest on
every PR to main and on pushes to main, uploading the HTML reports when
a run fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-android@v3 installs the obsolete "tools" package by default, which
no longer exists in the SDK repository and fails the step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same fix as the test workflow: setup-android@v3's default install of the
obsolete "tools" package fails, so the next publish would break at SDK
setup. The existing verify step still checks platform and build-tools 36.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@contextablemark
contextablemark merged commit 3a59c35 into main Oct 17, 2026
1 check passed
@contextablemark contextablemark mentioned this pull request Oct 17, 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.

1 participant