Tests: cap vitest workers
This commit is contained in:
parent
704af78a5d
commit
969510fc60
@ -41,6 +41,7 @@ Docs: https://docs.clawd.bot
|
||||
- Google Chat: tighten email allowlist matching, typing cleanup, media caps, and onboarding/docs/tests. (#1635) Thanks @iHildy.
|
||||
- Google Chat: normalize space targets without double `spaces/` prefix.
|
||||
- Messaging: keep newline chunking safe for fenced markdown blocks across channels.
|
||||
- Tests: cap Vitest workers to reduce CI timeouts, especially on macOS.
|
||||
|
||||
## 2026.1.23-1
|
||||
|
||||
|
||||
@ -22,12 +22,13 @@ const parallelRuns = runs.filter((entry) => entry.name !== "gateway");
|
||||
const serialRuns = runs.filter((entry) => entry.name === "gateway");
|
||||
|
||||
const children = new Set();
|
||||
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
|
||||
const overrideWorkers = Number.parseInt(process.env.CLAWDBOT_TEST_WORKERS ?? "", 10);
|
||||
const resolvedOverride = Number.isFinite(overrideWorkers) && overrideWorkers > 0 ? overrideWorkers : null;
|
||||
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
||||
const perRunWorkers = Math.max(1, Math.floor(localWorkers / parallelRuns.length));
|
||||
const maxWorkers = isCI ? null : resolvedOverride ?? perRunWorkers;
|
||||
// Keep worker counts predictable across local runs and CI (avoid oversubscribing runners).
|
||||
// Total workers ~= localWorkers since we run unit/extensions in parallel.
|
||||
const maxWorkers = resolvedOverride ?? perRunWorkers;
|
||||
|
||||
const WARNING_SUPPRESSION_FLAGS = [
|
||||
"--disable-warning=ExperimentalWarning",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user