mirror of
https://github.com/bitbaum/datacat.git
synced 2026-12-04 05:30:26 +01:00
Removes the fleet auto-merge sweep caller (and wake chain where present); checks run on pull requests only, not again after merging; a deploy that waited for CI on main now deploys on push. The forge merge check (forge/verify) verifies each PR on its merge result and merges it. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
3.6 KiB
YAML
82 lines
3.6 KiB
YAML
# DataCat's root verify command gates frontend/backend unit tests, formatting,
|
|
# lint, types and the production frontend build. browser-smoke.yml separately
|
|
# exercises the real public article renderer at phone/desktop widths without
|
|
# a backend or external model. Full-stack authenticated journeys still require
|
|
# both services and a seeded database; this public renderer check does not
|
|
# certify those account, data-capture or AI workflows.
|
|
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
# On a branch the newest push is the only one that matters, so cancel the rest.
|
|
#
|
|
# On main the group is keyed per COMMIT. A commit cancelling a DIFFERENT
|
|
# commit's run breaks deployment, because every deploy path keys off that run:
|
|
# one that waits for CI to pass on the commit finds a cancelled run and stops,
|
|
# and one chained on `workflow_run` sees conclusion=cancelled and skips.
|
|
# auto-merge also re-arms CI with a dispatch, which under a single
|
|
# group-per-branch cancels the push run for the SAME commit.
|
|
#
|
|
# Measured 2026-09-11 across the fleet: 28 of 39 ci.yml files had this shape.
|
|
# loki stranded four merges silently (main green, nothing red, the box
|
|
# serving the previous build); hirnli failed its deploy loudly at the wait step.
|
|
concurrency:
|
|
group: ci-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || 'branch' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
verify-frontend:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
# pnpm before setup-node so `cache: pnpm` can find the store.
|
|
- uses: pnpm/action-setup@v6
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
cache-dependency-path: |
|
|
frontend/pnpm-lock.yaml
|
|
backend/pnpm-lock.yaml
|
|
|
|
- name: Install (frontend)
|
|
working-directory: frontend
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# backend/ has its own lockfile and, as of this commit, its own tests.
|
|
# Without this step `pnpm run verify` fails at `test:backend` with
|
|
# "Command vitest not found" — the script would be wired and the gate
|
|
# would be red, which is worse than the gate that was simply absent.
|
|
- name: Install (backend)
|
|
working-directory: backend
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# SSOT: one definition of "verified" lives in the ROOT package.json
|
|
# `verify` (format + lint + typecheck + test + build), run identically
|
|
# here and locally. Runs from repo root — the scripts cd into the
|
|
# workspace they need.
|
|
#
|
|
# `test` covers BOTH halves as of this commit. backend/ previously had a
|
|
# `test` script that was `echo "Error: no test specified" && exit 1`, and
|
|
# the root `test` only ran the frontend — so backend/utils/
|
|
# responseHandlers.test.js sat committed and executed by nothing, which
|
|
# its own docstring pointed out.
|
|
#
|
|
# Build is IN the gate as of 2026-08-04. It was deferred on a prisma-engine
|
|
# issue, and the cost of that gap was exact: contentlayer 0.3.1 reaches into
|
|
# a React internal that React 19 removed, so `/blog/[slug]` threw
|
|
# "d.getOwner is not a function" during prerender. lint and typecheck were
|
|
# both green — only a build could have caught it. The breakage sat on main
|
|
# while every CI run reported success.
|
|
- name: Verify
|
|
run: pnpm run verify
|
|
|
|
# Full-stack Playwright journeys still need both services and a seeded DB.
|
|
# Public shared-renderer coverage runs separately in browser-smoke.yml.
|