From 240232aed1303d1be999305aa0651ed69538b570 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 27 Jan 2026 16:13:02 +0000 Subject: [PATCH] fix: run windows ci tests serially --- scripts/test-parallel.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/test-parallel.mjs b/scripts/test-parallel.mjs index 242b444ff8..e753a6e76b 100644 --- a/scripts/test-parallel.mjs +++ b/scripts/test-parallel.mjs @@ -18,16 +18,18 @@ const runs = [ }, ]; -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 isMacOS = process.platform === "darwin" || process.env.RUNNER_OS === "macOS"; +const isWindows = process.platform === "win32" || process.env.RUNNER_OS === "Windows"; +const isWindowsCi = isCI && isWindows; const overrideWorkers = Number.parseInt(process.env.CLAWDBOT_TEST_WORKERS ?? "", 10); const resolvedOverride = Number.isFinite(overrideWorkers) && overrideWorkers > 0 ? overrideWorkers : null; +const parallelRuns = isWindowsCi ? [] : runs.filter((entry) => entry.name !== "gateway"); +const serialRuns = isWindowsCi ? runs : runs.filter((entry) => entry.name === "gateway"); const localWorkers = Math.max(4, Math.min(16, os.cpus().length)); -const perRunWorkers = Math.max(1, Math.floor(localWorkers / parallelRuns.length)); +const parallelCount = Math.max(1, parallelRuns.length); +const perRunWorkers = Math.max(1, Math.floor(localWorkers / parallelCount)); const macCiWorkers = isCI && isMacOS ? 1 : perRunWorkers; // Keep worker counts predictable for local runs; trim macOS CI workers to avoid worker crashes/OOM. // In CI on linux/windows, prefer Vitest defaults to avoid cross-test interference from lower worker counts.