Skip to content

ci: run tests before building and publishing - #20

Merged
YurMil merged 1 commit into
YurMil:mainfrom
TheoFrk:fix/deploy-test-gate
Sep 14, 2026
Merged

YurMil merged 1 commit into
YurMil:mainfrom
TheoFrk:fix/deploy-test-gate

Conversation

@TheoFrk

@TheoFrk TheoFrk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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 test step 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:

  • Existing suite: 25 tests passed locally.
  • Production build passed locally (including TypeScript compilation).
  • A temporary deliberately failing Vitest test made the actual pnpm test command exit 1; the fixture was removed and the clean suite passed again.
  • Workflow inspection confirms test → build → publish ordering, with no continue-on-error or overriding if condition.
  • git diff --check passed.

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.

Copilot AI 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.

🟡 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 test after installing dependencies and before pnpm run build in 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.

Comment on lines +30 to +31
- name: Run Tests
run: pnpm test

@YurMil YurMil left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@YurMil
YurMil merged commit 0e5edad into YurMil:main Sep 14, 2026
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