Skip to content

Add CI Kotlin Tests For Core Plugins#168

Open
ScottMorris wants to merge 7 commits intomainfrom
ci/plugin-kotlin-tests
Open

Add CI Kotlin Tests For Core Plugins#168
ScottMorris wants to merge 7 commits intomainfrom
ci/plugin-kotlin-tests

Conversation

@ScottMorris
Copy link
Copy Markdown
Contributor

Summary

  • extend the Kotlin CI job to run Android unit tests for core plugin modules in apps/threshold/src-tauri/gen/android
  • include generated Android Gradle files in the workflow cache dependency paths
  • upload plugin test result XML files together with Wear Kotlin test reports

Testing

  • workflow change only
  • plugin test tasks are now invoked in CI from the generated Android Gradle project

**What changed**
- extend `test-kotlin` to run Android unit tests for core Tauri plugin modules from `apps/threshold/src-tauri/gen/android`
- include generated Android Gradle files in workflow cache dependency paths
- upload plugin unit-test XML reports alongside Wear Kotlin test results

**Why**
- ensure CI validates Kotlin code in core plugins instead of only the Wear app test suite
- improve test coverage visibility in the shared test report
@ScottMorris ScottMorris added build Build related plugin Plugin work android Android toolchain and mobile CI concerns labels Feb 22, 2026
**What changed**
- add a `Pull Request Labels` section to `AGENTS.md`
- add a table-of-contents entry for the new labels guidance
- document expected label usage and consistency rules for PR creation and updates

**Why**
- standardise PR labelling so scope and impact are visible across the review stack
**What changed**
- replace plugin test execution in `test-kotlin` to run per-plugin Gradle unit-test tasks from each plugin Android project
- generate temporary Android settings files in CI for plugins that do not ship standalone settings
- run plugin tests with `-Pandroid.useAndroidX=true` to satisfy tauri-android dependencies
- upload plugin test reports from `plugins/**/android/build/test-results/**/*.xml`

**Why**
- fix CI failures caused by missing generated `apps/threshold/src-tauri/gen/android/tauri.settings.gradle`
- keep Kotlin CI coverage for core plugins without depending on local generated Android files
**What changed**
- fetch the `tauri` crate source in `test-kotlin` and derive a concrete `tauri-android` project path from it
- generate plugin Android settings files in CI that point `:tauri-android` to the fetched source
- apply this settings generation for both Kotlin DSL and Groovy settings plugin projects
- update Gradle cache dependency paths to plugin Android Gradle files

**Why**
- fix plugin Kotlin test failures where CI could not resolve `:tauri-android` because plugin-local `.tauri/tauri-api` is not present in checkout
- keep plugin test execution reliable without depending on generated local files
**What changed**
- run `test-kotlin` inside `ghcr.io/liminal-hq/threshold/ci-base:latest`
- add GHCR credentials and package-read permission for pulling the image
- remove explicit Java and Android SDK setup steps from the Kotlin job

**Why**
- use the prebuilt CI image instead of reinstalling toolchains in workflow steps
- keep the Kotlin job environment consistent with the repository CI base image
**What changed**
- add `actions/cache` to `test-kotlin` for Gradle caches and wrapper directories
- key cache invalidation to Wear and plugin Android Gradle build files

**Why**
- recover Gradle caching after moving Kotlin CI to the `ci-base` container
- reduce repeated dependency and wrapper download time in Kotlin test runs
**What changed**
- run the `test-kotlin` job container as root via `container.options`
- update Gradle cache paths to the GitHub Actions container home (`/github/home/.gradle`)

**Why**
- fix `EACCES` errors from `actions/checkout` writing runner state files under `/__w/_temp/_runner_file_commands`
- ensure Gradle cache restore/save targets the active home directory inside container jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Android toolchain and mobile CI concerns build Build related plugin Plugin work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant