Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Unit tests run on `bun test` (repo root, `bunfig.toml`); component and visual te
| Command | What it runs | Budget | Measured |
|---|---|---|---|
| `bun run test` = `test:changed` | what the diff affects: `bun test --changed` (unit); the component tests whose imports reach a changed file (`scripts/test-graph.ts`: a static import graph with the barrel flattened, because Vitest's own `--changed` selects every file in browser mode); the screenshots of those components; the docs routes mapped by `scripts/route-impact.ts`. Prints what it selected and why. Every component test runs when a shared file changed (styles, tokens, theme, stores, primitives, a test setup file). The site part needs a fresh `site/dist` (a build is ~75 s, over the budget) and says so when it skips | 60 s | 28 s for a one-component edit with a fresh `dist` (unit 0.4, components 4.6, screenshots 6.7, routes 16.6; load ~15) |
| `bun scripts/test-changed.ts --land` | the same plus the package and site builds and 5 canary routes (home, recipes, app-shell, templates/app, theme). This is the gate `issue-land.sh` runs; `validate` runs on the push. **When a shared file changed** (styles, tokens, theme, stores, primitives, a test setup file, the site layout, or a file the route map cannot place) it runs every component test and every route and **no screenshots**, under the larger budget; `--print-budget` says which one applies | 180 s; 360 s when a shared file changed | 104 s for a one-component edit (builds 17 + 58, routes 17; load ~15). Shared case at load 10: unit 5 + components 109 + builds 99 + routes 132 = 346 s; its sweep audits the gallery through 6 representative items (`E2E_GALLERY=representatives`), `test:full` audits all ~400 |
| `bun scripts/test-changed.ts --land` | the same plus the package and site builds and 5 canary routes (home, recipes, app-shell, templates/app, theme). This is the gate `issue-land.sh` runs; `validate` runs on the push. **When a shared file changed** (styles, tokens, theme, stores, primitives, a test setup file, the site layout, or a file the route map cannot place) it runs every component test and every route and **no screenshots**, under the larger budget; `--print-budget` says which one applies | 180 s; 420 s when a shared file changed | 104 s for a one-component edit (builds 17 + 58, routes 17; load ~15). Shared case at load 10: unit 5 + components 109 + builds 99 + routes 132 = 346 s; its sweep audits the gallery through 6 representative items (`E2E_GALLERY=representatives`), `test:full` audits all ~400 |
| `bun run validate` | themes, token lint, Biome, unit tests, both type checks, build, size | 90 s | 51 s at load 11 |
| `bun run test:full` | unit, every component test, every route (layout, axe, dist-html, every project including WebKit), fixtures. Release gate, part 1 of 2 | 300 s | components 109 s (load 25) + routes 168 s (load 29) + unit 40 s + fixtures 7 s: over budget on a busy machine, not measured on a quiet one |
| `bun run test:unit` | `bun test` on `packages/ui/tests/*.test.ts` (fails any test without an `expect`) | | 30 to 40 s |
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/tests/test-run-budget.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("test-run budgets", () => {
changed: 60,
validate: 90,
land: 180,
landShared: 360,
landShared: 420,
full: 300,
vrt: 180,
});
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-changed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* A SHARED change (a shared component file, or a route-wide one: styles, tokens, theme, primitives, the
* site layout, a test setup file, or a file the route map cannot place) runs every component test and, when
* it reaches the site, every route, and NO screenshots: those run at release (`test:vrt`) and on demand.
* `--print-budget` prints the budget this selection runs under (`land`, 180 s, or `landShared`, 360 s).
* `--print-budget` prints the budget this selection runs under (`land`, 180 s, or `landShared`, 420 s).
*
* unit `bun test --changed <base>` (module graph);
* components the component tests whose imports reach a changed file (scripts/test-graph.ts; Vitest's
Expand Down
6 changes: 4 additions & 2 deletions scripts/test-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ export const BUDGETS = {
/**
* `issue-land.sh` when a SHARED file changed: every component test and every route (the gallery through its
* representatives), no screenshots. Measured at load 10: unit 5 s + components 109 s + builds 99 s + routes 132 s = 346 s;
* the 300 s it started with was never measured (#546).
* the 300 s it started with was never measured (#546). Since then the land gate always rebuilds (#591) and the atlas,
* concepts, styles and index pages added routes: measured at load 7.5 on #583, unit 8 s + components 80 s + package 12 s +
* site 134 s + routes 148 s = 382.5 s with nothing failing, so 420 s (#596).
*/
landShared: 360,
landShared: 420,
/** `bun run test:full`: unit, every component test, every route, fixtures (release gate, part 1) */
full: 300,
/** `bun run test:vrt`: every component and site screenshot (release gate, part 2) */
Expand Down