mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
chore: tune vitest parallelism
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import os from "node:os";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
|
||||
const cpuCount = os.cpus().length;
|
||||
const e2eWorkers = isCI ? 2 : Math.min(4, Math.max(1, Math.floor(cpuCount * 0.25)));
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
pool: "forks",
|
||||
maxWorkers: e2eWorkers,
|
||||
include: ["test/**/*.e2e.test.ts"],
|
||||
setupFiles: ["test/setup.ts"],
|
||||
exclude: [
|
||||
|
||||
Reference in New Issue
Block a user