Skip to content

ci(web): run lint, test and build on every pull request - #101

Merged
Bugs5382 merged 1 commit into
mainfrom
ci/99-web-validation
Sep 22, 2026
Merged

Bugs5382 merged 1 commit into
mainfrom
ci/99-web-validation

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

Closes #99. Second of two: #100 fixed the break, this is the gate that would
have caught it.

What and why

Nothing in this repo was running lint, test or build. The checks were
licenses, PR hygiene, gitleaks and actionlint — so a pull request could be
green against a main that did not compile.

That is not hypothetical. #98 merged green and broke the production build; it
surfaced days later when the 1670 FleetOS host could not be rebuilt.

All three run, not one of them, because each catches what the others miss:

  • vitest run does not typecheck.
  • tsc -b runs only inside npm run build.

So a type error in a test file passes the suite and fails the production
build. That is exactly the shape of #99.

Two smaller choices:

  • npm ci, not npm install — installs exactly the lockfile and fails
    when package.json and the lockfile disagree, rather than quietly passing
    against a dependency tree nobody else has.
  • A tree-clean check at the end — catches a formatter or generated file
    that rewrites something in place, which would otherwise pass and surprise
    the next person.

Verification

  • Lint clean
  • Tests pass
  • Build succeeds

How this was verified

Every step the workflow runs was run locally in the same order, including the
npm ci that CI will do:

npm ci          # lockfile in sync
npm run lint    # eslint + prettier clean
npm run test    # 66 files, 287 tests
npm run build   # tsc -b && vite build, succeeds
git status      # clean
actionlint .github/workflows/ci-web.yml

Merge order

After #100, which is already merged. The gate would otherwise fail on its own
first run.

One thing worth a second opinion

The job pins Node 22 LTS. The repo declares no engines range, so that pin
becomes the de facto statement of what the project builds on — and it is not
what is on my workstation (24). If 22 is the wrong target, this is the line to
change.

Nothing in this repo was running any of these three commands. The checks
were licenses, PR hygiene, gitleaks and actionlint, so a pull request
could be green against a main that did not compile. That is not a
hypothetical: #98 merged green and broke the production build, and it
was found days later when the 1670 FleetOS host could not be rebuilt.

All three run, not one of them, because each catches what the others
miss. vitest run does not typecheck. tsc -b runs only inside
npm run build. So a type error in a test file passes the suite and fails
the production build, which is precisely the shape of the #99 break.

npm ci rather than npm install, so CI installs exactly the lockfile and
fails when package.json and the lockfile disagree, instead of quietly
passing against a dependency tree nobody else has.

The tree-clean check at the end catches a formatter or a generated file
that rewrites something in place, which would otherwise pass here and
surprise the next person.

The break this gate catches was fixed first, in #100, so this does not
fail on its own first run.

Closes #99
@github-actions github-actions Bot added the skip-changelog Excluded from release notes (chore/ci/test/style). label Sep 22, 2026
@Bugs5382

Copy link
Copy Markdown
Contributor Author

Adds .github/workflows/ci-web.yml: npm ci, npm run lint, npm run test, npm run build, then a tree-clean check. The new Web validation (lint, test, build) check ran on this PR and passed in 59s, so the gate is live rather than merely configured.

Every step was run locally in the same order first, including npm ci (lockfile in sync), and actionlint on the workflow.

This closes #99 with the break already fixed in #100, so the gate did not fail on its own first run. Worth flagging for review: the job pins Node 22 LTS, and since the repo declares no engines range that pin becomes the de facto build target. It is not what is on my workstation (24).

@Bugs5382
Bugs5382 merged commit 73cc78e into main Sep 22, 2026
9 checks passed
@Bugs5382
Bugs5382 deleted the ci/99-web-validation branch September 22, 2026 17:26
Bugs5382 added a commit that referenced this pull request Sep 25, 2026
Nothing in this repo was running any of these three commands. The checks
were licenses, PR hygiene, gitleaks and actionlint, so a pull request
could be green against a main that did not compile. That is not a
hypothetical: #98 merged green and broke the production build, and it
was found days later when the 1670 FleetOS host could not be rebuilt.

All three run, not one of them, because each catches what the others
miss. vitest run does not typecheck. tsc -b runs only inside
npm run build. So a type error in a test file passes the suite and fails
the production build, which is precisely the shape of the #99 break.

npm ci rather than npm install, so CI installs exactly the lockfile and
fails when package.json and the lockfile disagree, instead of quietly
passing against a dependency tree nobody else has.

The tree-clean check at the end catches a formatter or a generated file
that rewrites something in place, which would otherwise pass here and
surprise the next person.

The break this gate catches was fixed first, in #100, so this does not
fail on its own first run.

Closes #99

Co-authored-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Excluded from release notes (chore/ci/test/style).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(build): main does not compile, and no CI job would have noticed

1 participant