test: speed up test suite

This commit is contained in:
Peter Steinberger
2026-01-23 02:19:35 +00:00
parent 542cf011a0
commit 59a8eecd7e
24 changed files with 2393 additions and 3723 deletions

View File

@@ -1,3 +1,4 @@
import os from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
@@ -5,7 +6,7 @@ import { defineConfig } from "vitest/config";
const repoRoot = path.dirname(fileURLToPath(import.meta.url));
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
const isWindows = process.platform === "win32";
const localWorkers = 4;
const localWorkers = Math.max(4, Math.min(8, os.cpus().length));
const ciWorkers = isWindows ? 2 : 3;
export default defineConfig({