FORGE-68: run the ci checks as parallel jobs #680

Merged
gmackie merged 1 commit from FORGE-68-parallel-ci into main 2026-10-11 22:01:13 +00:00
Owner

Issue: https://tasks.gmac.io/gmacko/issue/FORGE-68 · plan: https://xev2v724is67.postplan.dev (phase 1)

Why

The ci job ran every check one after another: 12.2 min median, 19.7 max over 2 days. Measured step medians: api+web unit suites 292s, typecheck 127s, DB suites 88s, Go 77s (mostly compile), leaf tests 22s. These steps don't depend on each other.

Change

  • ci is split into parallel jobs: checks (typecheck, lint, package links, script/workflow verifications), unit-api, unit-web (leaf + web + health + mobile), database (per-job PostgreSQL service) and go (no pnpm install).
  • A final job named ci keeps the required check CI / ci. It needs all five with if: always(), merges their check-events streams and failure logs (via artifacts), runs the existing check-events summary and CTRF upload, and reports to ForgeGraph the same way. It fails unless every job passed; a skipped job counts as failure, and cancelled maps to cancelled.
  • The install moves into .forgejo/actions/pnpm-install (pnpm, Node and the retrying frozen install with the registry token passed as an input).
  • Runner comments in ci.yml and ops/ci-runners/README.md describe the fleet as of today (hetzner-ci added, labnuc tried and rolled back; FORGE-64).

Tests

  • New ci-aggregate.test.ts checks the required check name and needs/if wiring. It also executes the verdict script (all pass → success; failure/skipped → failure; cancelled → cancelled) and the artifact merge script (no artifacts; events and logs merged) under bash -e -o pipefail.
  • Runner-placement, live-schema-drift, deploy-go-cache and public-feed workflow tests: 15/15 pass. Workflow YAML parses (9 files).
  • This PR's own CI runs the new jobs and the composite action on the real runners, which is the end-to-end check.

Trade-off

Each PR now uses 5 runner slots for these checks instead of 1, and pays install overhead about four times (~30–60s each). That fits the current pool (hetzner-worker 1, hetzner-bob 2, hetzner-ci 2). The Containers executor in the plan is how this scales further.

🤖 Generated with Claude Code

Issue: https://tasks.gmac.io/gmacko/issue/FORGE-68 · plan: https://xev2v724is67.postplan.dev (phase 1) ## Why The `ci` job ran every check one after another: **12.2 min median, 19.7 max** over 2 days. Measured step medians: api+web unit suites 292s, typecheck 127s, DB suites 88s, Go 77s (mostly compile), leaf tests 22s. These steps don't depend on each other. ## Change - `ci` is split into parallel jobs: `checks` (typecheck, lint, package links, script/workflow verifications), `unit-api`, `unit-web` (leaf + web + health + mobile), `database` (per-job PostgreSQL service) and `go` (no pnpm install). - A final job named **`ci`** keeps the required check `CI / ci`. It needs all five with `if: always()`, merges their check-events streams and failure logs (via artifacts), runs the existing check-events summary and CTRF upload, and reports to ForgeGraph the same way. It fails unless every job passed; a skipped job counts as failure, and cancelled maps to cancelled. - The install moves into `.forgejo/actions/pnpm-install` (pnpm, Node and the retrying frozen install with the registry token passed as an input). - Runner comments in `ci.yml` and `ops/ci-runners/README.md` describe the fleet as of today (hetzner-ci added, labnuc tried and rolled back; FORGE-64). ## Tests - New `ci-aggregate.test.ts` checks the required check name and needs/if wiring. It also **executes** the verdict script (all pass → success; failure/skipped → failure; cancelled → cancelled) and the artifact merge script (no artifacts; events and logs merged) under `bash -e -o pipefail`. - Runner-placement, live-schema-drift, deploy-go-cache and public-feed workflow tests: 15/15 pass. Workflow YAML parses (9 files). - This PR's own CI runs the new jobs and the composite action on the real runners, which is the end-to-end check. ## Trade-off Each PR now uses 5 runner slots for these checks instead of 1, and pays install overhead about four times (~30–60s each). That fits the current pool (hetzner-worker 1, hetzner-bob 2, hetzner-ci 2). The Containers executor in the plan is how this scales further. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
perf(ci): run the ci checks as parallel jobs (FORGE-68)
Some checks failed
CI / gitleaks (pull_request) Successful in 13s
CI / storybook (pull_request) Successful in 2m19s
CI / web-build (pull_request) Failing after 2m41s
CI / unit-api (pull_request) Successful in 2m27s
CI / checks (pull_request) Failing after 3m27s
CI / ci (pull_request) Has been cancelled
CI / go (pull_request) Has been cancelled
CI / unit-web (pull_request) Has been cancelled
CI / database (pull_request) Has been cancelled
afb7970fd7
The single ci job ran typecheck, lint, every unit suite, the database
suites and Go one after another: 12.2 min median, 19.7 max. Split it into
parallel jobs (checks, unit-api, unit-web, database, go). Each tees into
its own ci.log and uploads its check events. A final job keeps the
required check name 'ci', needs all five, folds their check events and
failure logs, and reports to ForgeGraph as before. It fails unless every
job passed.

Install moves into a local composite action shared by the four Node
jobs. The Go job skips the pnpm install entirely.

Tests run the aggregate job's verdict and merge scripts under the Actions
shell options (bash -e -o pipefail). Runner comments and the runner
README now describe the fleet as of today. Also adds the Containers
executor plan aligned with FORGE-67.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gmackie force-pushed FORGE-68-parallel-ci from afb7970fd7
Some checks failed
CI / gitleaks (pull_request) Successful in 13s
CI / storybook (pull_request) Successful in 2m19s
CI / web-build (pull_request) Failing after 2m41s
CI / unit-api (pull_request) Successful in 2m27s
CI / checks (pull_request) Failing after 3m27s
CI / ci (pull_request) Has been cancelled
CI / go (pull_request) Has been cancelled
CI / unit-web (pull_request) Has been cancelled
CI / database (pull_request) Has been cancelled
to 160416fb64
All checks were successful
CI / gitleaks (pull_request) Successful in 9s
CI / storybook (pull_request) Successful in 1m26s
CI / unit-api (pull_request) Successful in 2m18s
CI / web-build (pull_request) Successful in 3m43s
CI / checks (pull_request) Successful in 3m52s
CI / go (pull_request) Successful in 1m21s
CI / database (pull_request) Successful in 2m47s
CI / unit-web (pull_request) Successful in 5m42s
forgegraph/ci CI passed
CI / ci (pull_request) Successful in 35s
2026-10-11 21:44:41 +00:00
Compare
Sign in to join this conversation.
No description provided.