This repository was archived by the owner on Sep 2, 2026. It is now read-only.
Repository navigation
ci: add build, lint and typecheck workflow - #33
Merged
Merged
Conversation
The repo only runs CodeQL, so dependency changes merge without ever being compiled. That is how PR #10 reached main: it bumped react-dom to 19.2.8 while react stayed at 19.2.4, and react-dom 19.2.8 requires `peer react@"^19.2.8"`. Every check stayed green while `npm ci` failed outright with ERESOLVE and no dependency tree could be resolved. Adds a CI workflow with two jobs: - web: `npm ci`, lint, typecheck, build on Node 22 (the version used by web/Dockerfile), with npm cache keyed on the lockfile. - terraform: `terraform fmt -check -recursive` and `terraform validate`. `npm ci` is used rather than `npm install` so CI installs exactly what the lockfile pins and fails on an unresolvable tree. The terraform job runs `init -backend=false` and validates config only. This repo has no backend and no deployed infrastructure, so the job needs no AWS credentials and cannot reach real AWS APIs. Also adds a `typecheck` script (`tsc --noEmit`) so the check runs identically locally and in CI.
- Explicitly set permissions: contents: read at the workflow level so both jobs run with the minimum required access (default is broader). - Add timeout-minutes: 20 to the web job and 10 to the terraform job to prevent hung builds from burning runner minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The repo only runs CodeQL. Dependency changes therefore merge without ever being compiled, linted, or typechecked.
That is exactly how PR #10 reached
main: it bumpedreact-domto19.2.8whilereactstayed at19.2.4, and[email protected]requirespeer react@"^19.2.8". Every check stayed green whilenpm cifailed outright withERESOLVEand no dependency tree could be resolved at all. It was only caught by running the checks by hand afterwards.What
Two jobs:
web— on Node 22 (the version pinned inweb/Dockerfile), with npm cache keyed onweb/package-lock.json:npm cinpm run lintnpm run typechecknpm run buildterraform— ininfra/terraform/awson Terraform 1.14.0:terraform fmt -check -recursiveterraform init -backend=falseterraform validateNotes on choices:
npm ci, notnpm install— installs exactly what the lockfile pins and fails on an unresolvable tree. This is the check that would have caught chore(deps): bump react-dom and @types/react-dom in /web #10.init -backend=false— this repo has no backend and no deployed infrastructure. Validating config only, so the job needs no AWS credentials and cannot reach real AWS APIs.tsc --noEmitpasses, and typescript-eslint (viaeslint-config-next) does not support TS 7 yet, so the lint step would break.Also adds a
typecheckscript (tsc --noEmit) toweb/package.jsonso the check is identical locally and in CI.Verification
npm run typechecknpm run lintnpm run buildterraform fmt -check -recursiveterraform validateThe GitHub Actions run on this PR is itself the remaining proof —
webandterraformshould both go green.Follow-ups after this
ci.ymlto branch protection as a required check so it actually gates merges.typescript7.x andeslint10.x Dependabot updates that are blocked upstream (see chore(deps-dev): bump typescript from 5.9.3 to 7.0.2 in /web #11 and chore(deps-dev): bump eslint from 9.39.4 to 10.9.1 in /web #12), so they stop regenerating every week.