Repository navigation
release.yml: run frontend + Rust tests before building a release - #156
Conversation
tests.yml (frontend vitest) and coverage.yml (frontend vitest + Rust via cargo llvm-cov) only trigger on pull_request/push:main — neither ever runs on a tag push, and workflow_dispatch here accepts any ref. release.yml's build job went straight into `tauri build`, which only typechecks as a side effect of `npm run build`'s `tsc && vite build` — npm test and cargo test never ran anywhere in this pipeline. A release tag pushed on a commit whose CI run was stale, skipped, or simply never existed for that ref would build and publish installers with nothing having actually verified the test suites pass. Added a `test` job (frontend typecheck + vitest, then Rust unit tests via cargo test — using the same externalBin placeholder-binary technique coverage.yml's rust job already relies on, since tauri-build's build.rs checks those paths exist even for a plain `cargo test`) and gated `build` on it via `needs: test`. Makes the release pipeline self-sufficient instead of trusting an assumption about some other workflow's earlier, possibly-unrelated run — mirrors the same fix just applied to developer-desktop-util-plugin's four release.yml files. Verified locally: `npx tsc --noEmit` clean, `cargo test --manifest-path src-tauri/Cargo.toml` — 115/115 passing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
=======================================
Coverage 46.12% 46.12%
=======================================
Files 313 313
Lines 21663 21663
Branches 5294 5294
=======================================
Hits 9992 9992
Misses 10485 10485
Partials 1186 1186
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
The new test job does not create ../dist, but cargo test compiles the devtool bin target where tauri::generate_context!() panics at compile time if frontendDist is missing. On a fresh runner (no dist), this job fails and, via needs: test, blocks every release. See the inline comment.
Reviewed changes
- New
testjob — runsnpx tsc --noEmit,npm test, andcargo testonubuntu-22.04, restoring thecoverageRust cache read-only and creating placeholderexternalBinfiles. buildgated byneeds: test— tag-push andworkflow_dispatchruns now require the test job to pass first.
The intent is sound and closes a real gap: tests.yml is PR-only and coverage.yml runs only on PR/push: main, so a tag built from a commit with no prior CI run was never tested. The externalBin placeholder technique is copied correctly from coverage.yml.
The one blocker is that the job is missing the frontend build step coverage.yml needs for the same cargo invocation.
Important
Pullfrog covered this run's model usage. DeepSeek Flash is fast and cheap — expect lighter work than a frontier model. This model allowance is temporary and separate from your Pullfrog plan. Connect a model-provider subscription or API key →
DeepSeek Flash (model usage covered by Pullfrog) | 𝕏
Every PR ran the frontend test suite on two separate runners for the same commit: tests.yml's `frontend` job (npm ci, tsc --noEmit, plain `npm test`) and coverage.yml's `frontend` job (npm ci, `npm run test:coverage`, Codecov upload) — the second is a strict superset of the first's test run, just instrumented for coverage. Both triggered on every `pull_request`, so this was a full duplicate npm ci + vitest run on every single PR push for no benefit: tests.yml is the required branch-protection check and never uploaded coverage; coverage.yml's job existed purely to produce that upload. Moved the coverage-instrumented run and Codecov upload into tests.yml itself (same `frontend` Codecov flag, same action pin) and gated coverage.yml's `frontend` job to `if: github.event_name != 'pull_request'` — it still runs on push:main to keep the baseline fresh, which tests.yml (PR-only) never touches. coverage.yml's `rust` job is unaffected: nothing else runs `cargo llvm-cov`/`cargo test` on the PR trigger, so there was no duplicate to remove there (release.yml's new `test` job only runs on tag push/workflow_dispatch, a different trigger entirely). Net effect: one fewer full runner (checkout + npm ci + vitest) per PR, with identical Codecov coverage still landing under the same flag from the same trigger, just from tests.yml instead of coverage.yml. Verified locally: `npm run test:coverage` — 1399/1399 passing, coverage/lcov.info produced correctly. `npx tsc --noEmit` clean.
There was a problem hiding this comment.
ℹ️ No new issues in this delta. The
release.ymltestjob is unchanged, so the prior review's blocking finding there still stands; the only new note is a doc nitpick.
Reviewed changes
- Frontend coverage moved into
tests.yml— thefrontendjob now runsnpm run test:coverageand uploadscoverage/lcov.infoto Codecov under thefrontendflag, replacing the plainnpm testit ran before. coverage.yml'sfrontendjob scoped topush: main— addedif: github.event_name != 'pull_request', removing the byte-for-byte duplicatenpm ci+ vitest run on PRs; the job stays on main to keep the Codecov baseline fresh.
The split is sound: tests.yml is PR-only, so main still gets exactly one frontend upload and PRs get exactly one, with no gap. rust is untouched and still runs on both triggers, and npm run test:coverage resolves to the same suite (vitest run --coverage) with no thresholds, so the required Typecheck and unit tests check is unaffected.
ℹ️ Nitpicks
codecov.yml:2-3still says both flags are "uploaded by.github/workflows/coverage.yml's two jobs". After this change thefrontendflag is uploaded bytests.ymlon PRs and bycoverage.ymlonpush: main, so that comment is now stale.
Important
Pullfrog covered this run's model usage. DeepSeek Flash is fast and cheap — expect lighter work than a frontier model. This model allowance is temporary and separate from your Pullfrog plan. Connect a model-provider subscription or API key →
DeepSeek Flash (model usage covered by Pullfrog) | 𝕏
cargo test compiles tauri::generate_context!, which reads frontendDist (../dist) at compile time, so the Rust tests failed without a frontend build. npm run build is tsc && vite build: it keeps the typecheck and creates dist. It also drops the direct npx call SonarCloud flagged (S6505/S8543). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dPxJt2uQHVHbbVeiVrCcx
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Replaced the release
testjob'snpx tsc --noEmitstep withnpm run build(tsc && vite build), producing the../distthattauri::generate_context!()reads at macro-expansion beforecargo testcompiles thedevtoolbin target.
This resolves the prior blocking finding: the test job now mirrors coverage.yml's rust job prerequisites (setup with the shared coverage cache key → npm run build → placeholder externalBins → cargo test) and no longer fails on a fresh runner. The previous thread has been replied to and resolved.
Important
Pullfrog covered this run's model usage. DeepSeek Flash is fast and cheap — expect lighter work than a frontier model. This model allowance is temporary and separate from your Pullfrog plan. Connect a model-provider subscription or API key →
deepseek-v4.1-flash (model usage covered by Pullfrog) | 𝕏
The frontend flag now comes from tests.yml on PRs and coverage.yml on main; the header still credited coverage.yml for both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dPxJt2uQHVHbbVeiVrCcx
|




Summary
tests.yml(frontend vitest) andcoverage.yml(frontend vitest + Rust viacargo llvm-cov) only trigger onpull_request/push: main— neither ever runs on a tag push, andworkflow_dispatchhere accepts any ref.release.yml'sbuildjob went straight intotauri build, which only typechecks as a side effect ofnpm run build'stsc && vite build—npm testandcargo testnever ran anywhere in this pipeline. A release tag pushed on a commit whose CI run was stale, skipped, or simply never existed for that ref would build and publish installers with nothing having actually verified the test suites pass.This is the same class of gap just found and fixed across
developer-desktop-util-plugin's fourrelease.ymlfiles (that repo's release build never rancargo testeither).Changes
Added a
testjob torelease.yml:npx tsc --noEmitnpm test(vitest)cargo test --manifest-path src-tauri/Cargo.toml— using the same externalBin placeholder-binary techniquecoverage.yml'srustjob already relies on, sincetauri-build'sbuild.rschecks those paths exist even for a plaincargo test.buildnow depends ontestvianeeds: test, so it's gated for both the tag-push trigger andworkflow_dispatch.Test plan
npx tsc --noEmit— cleancargo test --manifest-path src-tauri/Cargo.toml— 115/115 passing (106 unit + 9 integration)python3 -c "import yaml; yaml.safe_load(...)")🤖 Generated with Claude Code
https://claude.ai/code/session_01BCypCuViyQDKGWxWspXKs2
Generated by Claude Code