Skip to content

release.yml: run frontend + Rust tests before building a release - #156

Merged
DianaSensei merged 5 commits into
mainfrom
release-pipeline-run-tests
Oct 13, 2026
Merged

DianaSensei merged 5 commits into
mainfrom
release-pipeline-run-tests

Conversation

@DianaSensei

Copy link
Copy Markdown
Owner

Summary

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.

This is the same class of gap just found and fixed across developer-desktop-util-plugin's four release.yml files (that repo's release build never ran cargo test either).

Changes

Added a test job to release.yml:

  • npx tsc --noEmit
  • npm test (vitest)
  • cargo test --manifest-path src-tauri/Cargo.toml — 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.

build now depends on test via needs: test, so it's gated for both the tag-push trigger and workflow_dispatch.

Test plan

  • npx tsc --noEmit — clean
  • cargo test --manifest-path src-tauri/Cargo.toml — 115/115 passing (106 unit + 9 integration)
  • YAML validated (python3 -c "import yaml; yaml.safe_load(...)")

🤖 Generated with Claude Code

https://claude.ai/code/session_01BCypCuViyQDKGWxWspXKs2


Generated by Claude Code

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.
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.12%. Comparing base (0e97e63) to head (aad9d59).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           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           
Flag Coverage Δ
frontend 40.73% <ø> (ø)
rust 69.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test job — runs npx tsc --noEmit, npm test, and cargo test on ubuntu-22.04, restoring the coverage Rust cache read-only and creating placeholder externalBin files.
  • build gated by needs: test — tag-push and workflow_dispatch runs 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 →

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (model usage covered by Pullfrog) | 𝕏

Comment thread .github/workflows/release.yml
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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in this delta. The release.yml test job 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 — the frontend job now runs npm run test:coverage and uploads coverage/lcov.info to Codecov under the frontend flag, replacing the plain npm test it ran before.
  • coverage.yml's frontend job scoped to push: main — added if: github.event_name != 'pull_request', removing the byte-for-byte duplicate npm 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-3 still says both flags are "uploaded by .github/workflows/coverage.yml's two jobs". After this change the frontend flag is uploaded by tests.yml on PRs and by coverage.yml on push: 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 →

Pullfrog  | Fix it ➔ | View workflow run | Using 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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Replaced the release test job's npx tsc --noEmit step with npm run build (tsc && vite build), producing the ../dist that tauri::generate_context!() reads at macro-expansion before cargo test compiles the devtool bin 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 →

Pullfrog  | View workflow run | Using 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
@sonarqubecloud

Copy link
Copy Markdown

@DianaSensei
DianaSensei merged commit 9614f19 into main Oct 13, 2026
20 checks passed
@DianaSensei
DianaSensei deleted the release-pipeline-run-tests branch October 13, 2026 09:37
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.

3 participants