Repository navigation
ci: split the slowest PR CI jobs into parallel legs - #7705
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 486 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
A pull request's CI took about 19 minutes, and one job set that time: test-ui ran the whole UI Vitest project on one runner for about 16 minutes. test-node (about 12 minutes), the docsite chain (about 13) and registry-contract (about 9) were next in line. - test-ui and test-node each run in four legs with Vitest's --shard. The repository checks and the isolated FR23 benchmark run in leg 1; FR23 still starts only after that runner's other UI workers exit. - registry-contract runs its preview and hidden production registries in two legs. Each leg was verified alone from an empty registry directory. - docsite-test becomes a join over docsite-browser and a new docsite-data job, so generation and tests run beside the browser contract instead of after it. Spec-only PRs still validate spec records in docsite-test. - docsite-browser runs on four cores, and the packages it needs after Core build side by side. - The visual scout runs in five legs instead of three. Required check names (test, build, docsite-test, lint) are unchanged; a matrix job's result is success only when every leg passed, so each join still fails closed. The workflow contract tests now pin the legs.
e0771b3 to
aa6e205
Compare
There was a problem hiding this comment.
No blocking issues found: the new legs keep test and docsite-test fail-closed, every test file still runs exactly once with the FR23 benchmark isolated in UI leg 1, and CI on this head brought both required checks in about 9 to 10 minutes after it started. Nothing further is needed from you; maintainers may want to weigh the extra runner time, since the split jobs now occupy 16 4-core runners per broad pull request where they used 6.
[Automated review]
Maintainer impact
Every pull request waits about 19 minutes for CI (median of the last 40 successful runs, p90 about 20 minutes). One job sets that time in nearly every run:
test-uiruns the whole UI Vitest project on one runner, and its test step alone takes about 16 minutes. The next-longest paths aretest-node(about 13.5 minutes),docsite-browserfollowed bydocsite-test(about 13 minutes), the visual chain (about 14 minutes to the end ofStable visual regression), andregistry-contract(about 9 minutes). Queue time is not the problem: jobs start in a few seconds.Intended invariant
AST-030 FR7:
test,build,docsite-testandlintkeep reporting on every pull request through their jobs or join jobs, and any owned failure fails its join. Every test file still runs in exactly one place, and AST-036 FR23 still runs only after the other UI workers on its runner have exited.Change
test-uiandtest-nodeeach run in four legs with Vitest's--shard. The repository checks (copyright, exports, CLI api types, token docs, lab readiness, knowledge history), the isolated FR23 benchmark and the theme-family contract run in leg 1 only.registry-contractruns as two legs,previewandproduction. Each leg builds the packages, then generates and verifies its own registry.docsite-testbecomes a join overdocsite-browserand a newdocsite-datajob (the Core and canary package builds, thengenerateandtest). These used to run one after the other; now they run side by side. Spec-only PRs still validate spec records indocsite-testitself.docsite-browserruns on4-core-ubuntu. After Core, the 11 packages it needs build side by side (pnpm --workspace-concurrency=4); pnpm still orders them by their declared dependencies.visual-scoutruns in five legs instead of three. The scout library joins any shard count.For each matrix job,
needs.<job>.resultissuccessonly when every leg passed. Soci-test-join.mjsand the docsite guards stay fail-closed without changes.Evidence
test-uimedian 17m27s (step 16m02s);test-node13m35s;docsite-browser10m12s thendocsite-test2m30s;registry-contract8m54s; visual scout legs about 4m20s each.--shard=3/4run picked the same files, except at one slice boundary. Expected slowest legs: about 5 to 6 minutes for UI (the two slowest files are about 3.5 minutes each and set a floor) and about 4 to 5 minutes for Node. CI on this PR gives the real numbers.Scope
Testing
pnpm vitest run --project node .github/scripts/: 1,156 tests. The only failure isaccessibility-audit.integration.test.mjs, which is flaky on my machine without the change too (a different subset fails on each run, and it passes on reruns).pnpm vitest run --project ui --shard=3/4(with FR23 excluded): 143 of 573 files, 3,543 tests, all passing.pnpm -F @astryxdesign/core build, then the parallel build of the other 11 packages (34s, everydistwritten).pnpm build, each registry leg ran on its own from an emptyapps/docsite/public/shadcn. Production: gate,generate-data(latest), the hidden-production vitest, thenverify-full-catalogwith published packages (909 items). Preview:generate-data(canary), thenverify-full-catalog(1,030 items). Both passed.prettier --checkon every changed file.