Quality gates
What runs on every pull request
The Check PR workflow (.github/workflows/ci.yml) runs these steps in order:
- Install dependencies with
yarn install --frozen-lockfile. - Types:
yarn type-check. - Formatting:
yarn format:ci(Prettier, over the whole repository). - Lint:
yarn lint(ESLint 9). - Build:
yarn build(the production Next.js build). - Tests:
yarn test(Vitest: unit tests and every Storybook story, in headless Chromium). - Storybook build:
yarn build-storybook. - Transition probe (non-blocking):
yarn probe:transitionsagainst the production build, withcontinue-on-error, so a failure is visible in the log but does not fail the check. See Motion and transitions. - Commit messages: commitlint, checking conventional commits.
Run the same checks locally
yarn type-check
yarn lint
yarn format:ci
yarn build
yarn testyarn test needs a Chromium for Playwright once: npx playwright install chromium.
The transition probe is separate from yarn test because it needs a running production server: yarn build && yarn start, then yarn probe:transitions in another terminal.
Tests
vitest.config.ts defines two projects:
unitrunssrc/**/*.test.{ts,tsx}andscripts/**/*.test.mjsin Node. The resume request logic insrc/lib/resume-request/and the transition probe’s budget logic inscripts/probe-budgets.mjsare covered here.storybookruns every story as a browser test. Stories sit next to their components as*.stories.tsx, and a story with aplayfunction is also an interaction test. Runyarn storybookto work on components on port 6006.
The Storybook Vite config in .storybook/main.ts mirrors the app: vanilla-extract styles, the @/ aliases and the app fonts.
Commit hooks and conventions
- Conventional commits are enforced by Husky and commitlint (
.commitlintrc.json) on every commit message. The same convention drives the release process:featbecomes a minor release andfixa patch. - Pre-commit lint-staged (lint and format on staged files) runs only when
HUSKY_ENABLED=trueis set locally.
Limitation
Branch protection is not available for this private repository on the GitHub Free plan, so the checks above are advisory: wait for a green run before merging.
Last updated on