chore: keep vitest workers at 4

This commit is contained in:
Peter Steinberger
2026-01-20 10:39:34 +00:00
parent 6942ceb7a9
commit e110cf4fb1

View File

@@ -1,12 +1,10 @@
import path from "node:path"; import path from "node:path";
import os from "node:os";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config"; import { defineConfig } from "vitest/config";
const repoRoot = path.dirname(fileURLToPath(import.meta.url)); const repoRoot = path.dirname(fileURLToPath(import.meta.url));
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true"; const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
const cpuCount = os.cpus().length; const localWorkers = 4;
const localWorkers = Math.min(16, Math.max(4, Math.floor(cpuCount * 0.5)));
export default defineConfig({ export default defineConfig({
resolve: { resolve: {