Skip to content

Checks

npm run check is the local gate. The script in the root package.json is:

npm run typecheck && npm run lint && npm run guards && npm test
PartCommandWhat it covers
typechecktsc -bThe composite TypeScript build
lintbiome ci .Format and lint. Biome 2.5.15
lintdepcruise --config scripts/lint/.dependency-cruiser.cjs .Import boundaries. dependency-cruiser 18.7.0
guardsvitest run scripts/guardsThe guards under scripts/guards/, including notes
testnode scripts/test/run.tsThe test runner below. Vitest 5.0.5, TypeScript 7.0.2

Versions are the root devDependencies.

The test runner

scripts/test/run.ts discovers every *.test.ts file. The run fails unless each file the mode starts was selected by the include, ran at least one passing or failing test, and skipped nothing. A stray *.spec.* file outside tests/e2e/, or a *.test.js file, fails the same command.

ModeHow it startsWhat runs
localnpm test, when CI is not true and GITHUB_ACTIONS is unsetEvery project except images
unitsnpm test -- --unitsEvery project except images, under CI’s rules: every listed non-image test file must run, and nothing is skipped
ciCI=true or GITHUB_ACTIONS=true, neither flagNon-image projects, then images
imagesnpm run test:imagesThe images project only

--units and --images are exclusive. GITHUB_ACTIONS set while CI is not true is refused. A local run prints that the images project was left for CI. npm run test:images exits when docker info fails.

CI

.github/workflows/ci.yml runs code and image-tests in parallel. check is the required name in .github/required-checks.json. It needs both and fails unless both succeeded.

On a draft only code runs, together with pr-shape; every other job waits for the pull request to be marked ready (P0.07l, ADR 0059). The required checks are the names in .github/required-checks.json, eight today.

JobWhat it runs
codeIncludes typecheck, lint, guards, then npm test -- --units
image-testsnpm run test:images on builder images (docker-container, default-load=true, BUILDKIT_IMAGE moby/buildkit:v0.34.0@sha256:b059f8d7226d0b326bc871af489a5dddf65e36af4d20d14251b072974d9ee87c in .github/workflows/ci.yml and .github/workflows/publish-images.yml)
checkNo tests. Fails unless code and image-tests both succeeded

Postgres tests run with the non-image projects. They start the pinned image themselves. Setup names that path. Image tests (*.image.test.ts) are the images project. Local and units leave them out.

Endpoint pages

endpoint_pages_match_manifests in scripts/docs/endpoints.test.ts fails when docs/site/content/endpoints/ is stale. npm test runs the file, and npm run check runs npm test. CI job code runs it with npm test -- --units. The rewrite command and the yaml inputs are on Docs rules.