Measure the coverage of the backend, common, frontend and render-wasm
test suites in CI, and show it on the workflow run pages and in one
"Coverage Report" comment on each pull request.
- Backend and common run kaocha with the cloverage plugin through a new
`:coverage` alias, which writes lcov, HTML and an EMMA report. The PR
report shows lines and Clojure forms (as statements); cloverage
measures no functions or branches. Plain local runs are unchanged.
- Frontend runs the compiled test bundle with V8 coverage
(`pnpm run test:coverage`, `frontend/scripts/coverage.js`) and maps it
back to the ClojureScript sources through the source maps of the test
build. UI namespaces (`app/main/ui`) are left out.
- Render-wasm runs its native Rust tests under cargo-llvm-cov when
`RENDER_WASM_COVERAGE` is set. The devenv image lacks the tool, so the
workflow downloads a pinned release and checks its sha256.
- `scripts/coverage-summary.mjs` renders an lcov file as a markdown table
by source area for `$GITHUB_STEP_SUMMARY`; each workflow also uploads
the HTML report as an artifact.
- `scripts/coverage-comment.mjs` keeps a single PR comment, laid out like
the Vitest Coverage Report Action, with a section per project and the
coverage of the changed files. Each job updates its own section; the
data of every project lives in a hidden block of the comment, and a
job writes again when a concurrent one dropped its data.
- Lines have targets that only colour the report: 70% backend and
common, 50% frontend, 40% render-wasm.
- The comment step only runs for PRs from branches of this repo: fork
PRs get a read-only token and keep the summary on the run page.
AI-assisted-by: claude-opus-5-5
Forward Cargo arguments as an array and honor explicit profiles.
Build and copy each renderer target once under the repository lock,
with watch rebuilds using the same wrapper.
Select this checkout's compiler artifact and matching generated enum
table from Cargo JSON. Record actual features, profile and output paths,
and allow callers to override publication destinations.
Run the existing Cargo parser tests before the renderer's native tests
and stop on parser failures.
AI-assisted-by: gpt-6.1-sol
Protect shared setup, compilation, artifact copy, and target cleanup with
one flock lock per checkout. Route watch builds and frontend cleanup
through the protected scripts.
Document the lock contract and normalize the frontend and exporter
build:wasm commands.
Closes#11901
AI-assisted-by: Space Bunny Free
* ✨ Add headless wasm render backend to the exporter
* ♻️ Move render-wasm bridge to common and split wasm builds
* 🔧 Upload builtin font variants in the wasm exporter
* ♻️ Move shared font and resources utils out of render_wasm
* ⚡ Fetch only the exported roots in the wasm exporter
* ⚡ Bound save_layer rects in the vector export path