diff --git a/tools/ci.ts b/tools/ci.ts index 74d6c6fe..4f13c350 100644 --- a/tools/ci.ts +++ b/tools/ci.ts @@ -92,7 +92,7 @@ if (quick) { // The browser suites fall back to Google Chrome without playwright's own headless Chromium; Chrome's shutdown takes // seconds to half a minute per browser, which makes those shards several times slower. -try { +if (tasks.some(t => t.name === 'desktop boot check' || t.cmd.some(a => HEAVY.some(h => a.endsWith(h))))) try { const { registry } = await import('playwright-core/lib/server/registry/index' as string); const exe = registry.findExecutable('chromium-headless-shell')?.executablePath('javascript') as string | undefined; if (exe && !existsSync(exe)) console.log(`ci: playwright's headless Chromium is not installed (${exe.replace(homedir(), '~')}): the browser tests use Google Chrome, which is much slower to close. Install it once: bunx playwright install chromium-headless-shell`);