From 379945d911e5d638c03a00556b03ab893008eb8d Mon Sep 17 00:00:00 2001 From: Jacob Ebey Date: Tue, 3 Feb 2026 06:23:09 -0800 Subject: [PATCH] update workers in CI (#14760) --- integration/playwright.config.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integration/playwright.config.ts b/integration/playwright.config.ts index 965aacd57d..fd19a09d96 100644 --- a/integration/playwright.config.ts +++ b/integration/playwright.config.ts @@ -1,3 +1,5 @@ +import * as os from "node:os"; + import type { PlaywrightTestConfig } from "@playwright/test"; import { devices } from "@playwright/test"; @@ -7,6 +9,8 @@ process.env.NODE_OPTIONS = (process.env.NODE_OPTIONS ?? "") + ` --no-warnings=ExperimentalWarning`; const isWindows = process.platform === "win32"; +let workers = Math.floor(os.cpus().length / 2); +if (workers < 2) workers = 2; const config: PlaywrightTestConfig = { testDir: ".", @@ -18,8 +22,8 @@ const config: PlaywrightTestConfig = { }, /* Maximum time one test can run for. */ timeout: isWindows ? 60_000 : 30_000, - fullyParallel: !(isWindows && process.env.CI), - workers: isWindows && process.env.CI ? 1 : undefined, + fullyParallel: true, + workers, expect: { /* Maximum time expect() should wait for the condition to be met. */ timeout: isWindows ? 10_000 : 5_000,