ci: re-enable parallel vitest on Windows CI
This commit is contained in:
committed by
Peter Steinberger
parent
47596257ea
commit
2d7428a7f2
@@ -29,15 +29,13 @@ const shardCount = isWindowsCi
|
|||||||
? shardOverride
|
? shardOverride
|
||||||
: 2
|
: 2
|
||||||
: 1;
|
: 1;
|
||||||
const windowsCiArgs = isWindowsCi
|
const windowsCiArgs = isWindowsCi ? ["--dangerouslyIgnoreUnhandledErrors"] : [];
|
||||||
? ["--no-file-parallelism", "--dangerouslyIgnoreUnhandledErrors"]
|
|
||||||
: [];
|
|
||||||
const passthroughArgs = process.argv.slice(2);
|
const passthroughArgs = process.argv.slice(2);
|
||||||
const overrideWorkers = Number.parseInt(process.env.OPENCLAW_TEST_WORKERS ?? "", 10);
|
const overrideWorkers = Number.parseInt(process.env.OPENCLAW_TEST_WORKERS ?? "", 10);
|
||||||
const resolvedOverride =
|
const resolvedOverride =
|
||||||
Number.isFinite(overrideWorkers) && overrideWorkers > 0 ? overrideWorkers : null;
|
Number.isFinite(overrideWorkers) && overrideWorkers > 0 ? overrideWorkers : null;
|
||||||
const parallelRuns = isWindowsCi ? [] : runs.filter((entry) => entry.name !== "gateway");
|
const parallelRuns = runs.filter((entry) => entry.name !== "gateway");
|
||||||
const serialRuns = isWindowsCi ? runs : runs.filter((entry) => entry.name === "gateway");
|
const serialRuns = runs.filter((entry) => entry.name === "gateway");
|
||||||
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
||||||
const parallelCount = Math.max(1, parallelRuns.length);
|
const parallelCount = Math.max(1, parallelRuns.length);
|
||||||
const perRunWorkers = Math.max(1, Math.floor(localWorkers / parallelCount));
|
const perRunWorkers = Math.max(1, Math.floor(localWorkers / parallelCount));
|
||||||
|
|||||||
Reference in New Issue
Block a user