ci: run tests before building and publishing - #20
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new test gate makes the existing Node version mismatch (workflow uses Node 24 vs engines.node 22.x) more likely to cause CI-only failures and should be reconciled.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an explicit test gate to the deployment workflow so regressions are caught before building and publishing the static app.
Changes:
- Run
pnpm testafter installing dependencies and beforepnpm run buildin the deploy workflow.
File summaries
| File | Description |
|---|---|
| .github/workflows/deploy.yml | Adds a pnpm test step to fail the deploy job early on test regressions. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - name: Run Tests | ||
| run: pnpm test |
YurMil
left a comment
There was a problem hiding this comment.
Reviewed and verified locally: all 25 tests pass on this branch, and pnpm test runs the non-watch Vitest script, so the gate terminates in CI and a failing test stops the build and publish steps. Merging as a voluntary contribution — thank you, @TheoFrk.
The deployment workflow currently builds and publishes without running the existing test suite, so a test regression can reach the website. This adds an explicit
pnpm teststep before the build; the build and publishing steps retain their default success requirement.Related: YurMil/cadautoscript.com#152 (this PR covers pdfs-master; the other repository is handled separately).
Validation:
pnpm testcommand exit 1; the fixture was removed and the clean suite passed again.continue-on-erroror overridingifcondition.git diff --checkpassed.No remote deployment or publishing action was executed. Live GitHub failure-gate verification remains for the maintainer/CI environment. Local validation used Node 24.19.0 and pnpm 11.19.0; the repository pins pnpm 10.33.0.
Prepared with OpenAI Codex assistance under @TheoFrk's authorization. A US$50 total reward for both repositories was proposed in the linked issue but is not approved; this PR does not assume funding or payment.