Files
hanzo.ai/hanzo.yml
zeekay 6990007567 ci: a push is checked against the last green gates run, and hanzo.yml names the right workflow
A push cancels the push before it, and a cancelled run checks nothing, so what it
changed sat in no run's diff: the next push compared against its own parent. The
plan step now takes the last successful gates run on main as the base. hanzo.yml
said deploy.yml runs the gates on a push; gates.yml does, deploy.yml runs only the
backing scan.

Claude-Session: https://claude.ai/code/session_017vrVus6PPBgP5YRzKV1iqW
2026-10-26 03:49:43 -07:00

59 lines
2.4 KiB
YAML

# Read by hanzoai/ci (.hanzo/workflows/cicd.yml). The site is a static export
# published by .hanzo/workflows/deploy.yml; there is no image and no operator
# deploy. Node and pnpm are pinned once, in package.json.
test:
- name: lint
run: |
corepack enable
pnpm install --frozen-lockfile
pnpm typecheck
pnpm lint
# Specs that read source: no build and no browser, so they fail on the commit.
- name: unit
run: |
corepack enable
pnpm install --frozen-lockfile
pnpm test:unit
# Runs against `out/`, the bytes that ship: a ratio lineHeight compiles to px
# and an unlinked page still lands in sitemap.xml, neither visible in source.
# On a push to main gates.yml runs them over the export it builds (deploy.yml
# runs only the backing scan before it publishes), so this run leaves them to
# it rather than running them twice.
# On a pull request gates.yml runs them: the specs the change reaches, or the
# whole suite on eight shards when it touches what every spec shares. Here
# they were the whole suite again on one runner at two workers, 30 minutes
# and more, behind a gates.yml run that had already answered.
- name: gates
run: |
if [ "$GITHUB_EVENT_NAME" = push ] && [ "$GITHUB_REF" = refs/heads/main ]; then
echo "gates: gates.yml runs them on this push"; exit 0
fi
if [ "$GITHUB_EVENT_NAME" = pull_request ]; then
echo "gates: gates.yml runs them on this pull request"; exit 0
fi
corepack enable
pnpm install --frozen-lockfile
pnpm build
# The runner image bakes browsers under /opt/playwright as root, so the
# job's own copy goes where the job may write.
export PLAYWRIGHT_BROWSERS_PATH="$PWD/.cache/ms-playwright"
pnpm exec playwright install chromium
pnpm gates
# hanzo-design.allow.json is a ratchet: a count over or under it fails.
- name: one design system
run: |
corepack enable
pnpm install --frozen-lockfile
pnpm lint:design
# The rest read tracked files only, so they report when an earlier step fails.
- name: tailwind floor
run: node scripts/tailwind-floor.mjs --check
- name: price literals
run: node scripts/audit-price-literals.mjs
- name: dead classes
run: node scripts/audit-dead-classes.mjs
- name: catalog answers
run: node scripts/audit-catalog.mjs
- name: model counts
run: node scripts/audit-model-counts.mjs