Add CI and a proof-of-concept xunit test on stub#21
Merged
Conversation
platform had no CI and no automated tests. This establishes both, kept small: - .github/workflows/ci.yml: build + installDist with Gradle wrapper validation, on push to master, pull requests, and manual dispatch. - A first xunit unit-test lane on :stub. The routing/templating logic in the Unavailable web service is extracted into a pure StubContent helper (behavior-preserving) so it can be tested with no web server or injection context; StubTest exercises it (4 tests). - failOnTestFailure=true on :stub so a failing test actually fails the build; the XTC plugin otherwise logs failures and exits 0. Verified locally: ./gradlew build installDist succeeds, StubTest passes 4/4, and a deliberately broken assertion fails the build (gate confirmed).
ggleyzer
approved these changes
Jul 6, 2026
…class Per review (Gene): the isLandingPath/applyTags helpers don't need a separate class. As static functions on the Unavailable service they are equally callable and unit-testable (a static call instantiates no service and needs no web server), so the extra type added nothing. Tests call Unavailable.isLandingPath directly, which reads fine without the suggested import alias.
The gradle-node-plugin is already at the latest (7.1.0). Bump the rest of the version-catalog toolchain and refresh the Quasar GUI deps to the latest within their existing semver ranges (no major bumps): - libs.versions.toml: nodejs 22.21.0 -> 22.23.1, npm 11.6.2 -> 11.18.0 - package.json: quasar 2.18.5 -> 2.21.1 (safe minor) - yarn.lock regenerated in-range: axios 1.12.2 -> 1.18.1, pinia 3.0.3 -> 3.0.4, vue -> 3.5.x latest, etc. Verified: ./gradlew build installDist is BUILD SUCCESSFUL under Node 22.23.1 -- the Quasar SPA builds and the stub tests still pass.
`yarn lint` was already broken before the dependency refresh: ESLint 9 defaults to flat config, and eslint-plugin-vue 10 no longer ships the legacy `plugin:vue/vue3-essential` shareable config, so the old `.eslintrc.cjs` could not load at all (and eslint-plugin-vue's required peer `vue-eslint-parser` was never declared). - Add `vue-eslint-parser` (the unmet peer surfaced by the refresh). - Replace `.eslintrc.cjs` + `.eslintignore` with `eslint.config.mjs` (flat): vue3 essential rules, prettier last, browser+node globals, same custom rules and ignore patterns. - lint script: `eslint --ext .js,.vue ./` -> `eslint .` (`--ext` removed in ESLint 9; the vue flat config lints `.vue`). - Drop two now-stale inline directives (`/* eslint-env node */`, `/* eslint-disable */`) that flat config flags. Verified: `yarn lint` runs clean (0 problems) and `./gradlew build installDist` succeeds under Node 22.23.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
platform currently has no CI and no automated tests. This is a deliberately small proof-of-concept that establishes both.
What's added
1. CI —
.github/workflows/ci.ymlRuns on push to
master, on PRs, and via manual dispatch. OneBuild & testjob: JDK 25 +gradle/actions/setup-gradle(validate-wrappers: true), then./gradlew build(compiles every module + runs unit tests) and./gradlew installDist(assembles the runnable platform). For XTC, "compiles + assembles a runtime" is already a meaningful gate that nothing guarded before.2. A unit-test lane on
:stubstubwas picked as the POC target because it has zero module dependencies and zero@Inject, so a test runs in a bare xunit harness. The routing/templating decisions in theUnavailableweb service are extracted into a pure, dependency-freeStubContenthelper (behavior-preserving), andStubTestexercises it:isLandingPath— root /index.htmlvs. other pathsapplyTags— placeholder substitution3.
failOnTestFailure = trueon:stubThe XTC plugin's default only logs test failures and exits 0. This makes a failing test actually fail the build, so the lane is a real gate, not decorative.
Verification (local)
./gradlew build installDist— BUILD SUCCESSFUL (all modules, including platformUI)../gradlew :stub:build— StubTest passes 4/4.:stub:testXtc FAILED→BUILD FAILED, confirming the gate; then restored.Suggested next steps (not in this PR)
auth(the security core) andcommon, extracting pure seams where needed.tests/dir into an in-process integration module driving common/auth/host/DB scenarios.