Skip to Content
Quality gates

Quality gates

What runs on every pull request

The Check PR workflow (.github/workflows/ci.yml) runs these steps in order:

  1. Install dependencies with yarn install --frozen-lockfile.
  2. Types: yarn type-check.
  3. Formatting: yarn format:ci (Prettier, over the whole repository).
  4. Lint: yarn lint (ESLint 9).
  5. Build: yarn build (the production Next.js build).
  6. Tests: yarn test (Vitest: unit tests and every Storybook story, in headless Chromium).
  7. Storybook build: yarn build-storybook.
  8. Transition probe (non-blocking): yarn probe:transitions against the production build, with continue-on-error, so a failure is visible in the log but does not fail the check. See Motion and transitions.
  9. Commit messages: commitlint, checking conventional commits.

Run the same checks locally

yarn type-check yarn lint yarn format:ci yarn build yarn test

yarn 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:

  • unit runs src/**/*.test.{ts,tsx} and scripts/**/*.test.mjs in Node. The resume request logic in src/lib/resume-request/ and the transition probe’s budget logic in scripts/probe-budgets.mjs are covered here.
  • storybook runs every story as a browser test. Stories sit next to their components as *.stories.tsx, and a story with a play function is also an interaction test. Run yarn storybook to 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: feat becomes a minor release and fix a patch.
  • Pre-commit lint-staged (lint and format on staged files) runs only when HUSKY_ENABLED=true is 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