Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

test: run vitest projects in one concurrent pool (80s -> 42s)

7085a456a85c4415b60061fafaa48fd8173d6cae

Oliver Jan Krylow <oliver@bugabinga.net> · 2026-10-04 00:26 UTC

unverifiable SSH 1 parent

All projects share a single worker pool at maxWorkers "50%" instead of
sequential groups capped at 3/3/1/1. Dropped native's groupOrder so its slow
child-Pi validator overlaps other work. "50%" self-limits concurrent
subprocesses and auto-scales on smaller CI runners. Suite stays green (2424).

Changed files (1)

vitest.config.ts

ready
@@ -54,8 +54,10 @@
"scripts/build/packages.test.ts",
],
isolate: false,
- // Three fork workers avoid CPU/process contention.
- maxWorkers: 3,
+ // All projects share one concurrent worker pool sized to half the
+ // cores; vitest requires equal maxWorkers across projects that run in
+ // the same (default) group. "50%" self-limits on smaller CI runners.
+ maxWorkers: "50%",
},
},
{
@@ -69,7 +71,7 @@
exclude,
// Each contract test owns a sandboxed process.env; isolate per file.
isolate: true,
- maxWorkers: 3,
+ maxWorkers: "50%",
},
},
{
@@ -82,7 +84,10 @@
include: ["extensions/**/__serial__/**/*.test.ts"],
exclude,
isolate: true,
- maxWorkers: 1,
+ // Subprocess/module-mock heavy; isolate per file (fresh module state)
+ // and share the capped pool so total concurrent subprocesses stay
+ // bounded by the 50%-of-cores worker count.
+ maxWorkers: "50%",
},
},
{
@@ -94,7 +99,7 @@
include: ["scripts/build/packages.test.ts"],
exclude,
isolate: true,
- maxWorkers: 3,
+ maxWorkers: "50%",
},
},
{
@@ -106,8 +111,7 @@
include: validatorTests,
exclude,
isolate: true,
- maxWorkers: 1,
- sequence: { groupOrder: 1 },
+ maxWorkers: "50%",
},
},
],