HEL-4: CI for hello — install, lint, typecheck, build, smoke - #1
Merged
Merged
Conversation
Adds the GitHub Actions workflow that gates merges into main: - `.github/workflows/ci.yml`: single `ci` job on Node 20 that runs `npm ci`, `npm run lint`, `npm run typecheck`, `npm run build`, and `npm run smoke`, with `actions/setup-node` npm cache. 5-minute timeout; expected wall-clock ~60-80s. - `.eslintrc.json`: extends `next/core-web-vitals` so `next lint` runs non-interactively in CI (without a config file Next prompts with a TTY-only wizard). - `scripts/smoke.mjs`: end-to-end smoke. Picks a free port from the kernel (so it doesn't clash with the local dev server or the Paperclip control plane on 3100), starts `next start`, fetches `/`, and asserts the landing-page markers `<h1>hello</h1>` and "Something small is on the way." are present. Exits non-zero on any failure; cleans up the child server in `finally`. - `package.json` / `package-lock.json`: add `eslint` and `eslint-config-next` as devDependencies, plus the `smoke` script. - `docs/decisions/ci.md`: rationale for the workflow (why Actions, why these five steps, why the smoke boots a server, wall-clock budget, what's deliberately out of scope). - `README.md`: CI status badge (uses a placeholder github.com/hello-co/hello URL — see HEL-4 thread for the unblock owner who provisions the real remote) and a CI section pointing at the workflow and decision doc. Verified locally on this branch: - `npm run lint` / `typecheck` / `build` / `smoke` all green. - Deliberate typescript regression in app/page.tsx makes typecheck exit 2 with "Type 'string' is not assignable to type 'number'". - Deliberate landing-page regression (h1 swapped) makes the smoke script exit 1 with "response missing required marker: \"<h1>hello</h1>\"". Deploy is intentionally not part of this workflow — it lives on HEL-6. Co-Authored-By: Paperclip <noreply@paperclip.ing>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
.github/workflows/ci.yml) that runsnpm ci, lint, typecheck, build, and a smoke test on every push tomainand every PR.docs/decisions/ci.md.lmanualm/hello).Closes HEL-4 once this PR is green + branch protection is configured (HEL-8).
Test plan
main.cicheck blocks merge.