Skip to content

Run the test suite in CI, on every branch push - #7

Merged
BJMCox merged 1 commit into
mainfrom
ci-tests
Jul 28, 2026
Merged

Run the test suite in CI, on every branch push#7
BJMCox merged 1 commit into
mainfrom
ci-tests

Conversation

@BJMCox

@BJMCox BJMCox commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Closes the gap noted when #5 was merged: the 180 tests had never run anywhere but a contributor's machine, and pull requests reported no checks at all. The only workflow triggered on pushes to main and only ever invoked npm run build.

ci.yml (new)

npm test plus npm run build — which is tsc --noEmit && vite build, so it type-checks as well — on:

  • every branch push (branches: ['**']), so a branch is verified before it ever reaches a PR
  • pull requests from forks

A PR from a branch in this repo is skipped by the job's if, because the push event already checked that commit; without the guard every such commit would be checked twice. Same-repo push runs still surface as checks on the PR, so nothing is lost.

Concurrency is keyed per ref with cancel-in-progress, so pushing again supersedes an in-flight check of the same branch.

deploy.yml

Now runs the suite before building, so main can't publish a build whose tests fail.

Deployment is unchanged and still confined to deploy.yml and to main. Nothing in ci.yml publishes, and no branch push can reach Pages — worth stating explicitly, since adding branch triggers to the existing workflow instead would have made every branch push deploy the site.

Verification

This branch's own push produced run 30350856648 — success, with 25 passed (25) files / 180 passed (180) tests and tsc --noEmit && vite build in the log. That is the first time the suite has executed on GitHub's runners.

Note, not addressed here

actions/deploy-pages@v4 logs a Node 20 deprecation warning and is being force-run on Node 24. Harmless today, but it will need a version bump; out of scope for this change.

The only workflow ran on pushes to main and only ever invoked
`npm run build` — the 180 tests had never run anywhere but a
contributor's machine, and pull requests reported no checks at all.

Adds ci.yml: npm test plus npm run build (which is `tsc --noEmit &&
vite build`, so it type-checks too) on every branch push, and on pull
requests from forks. A pull request from a branch in this repo is skipped,
since the push event already covered that commit; without the guard every
such commit would be checked twice.

deploy.yml now runs the suite before building, so main cannot publish a
build whose tests fail. Deployment stays confined to deploy.yml and to
main — nothing in ci.yml publishes, and no branch push can reach Pages.
@BJMCox
BJMCox merged commit 07f2383 into main Jul 28, 2026
2 checks passed
@BJMCox
BJMCox deleted the ci-tests branch July 28, 2026 10:54
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.

1 participant