Skip to content

Commit 5147e77

Browse files
authored
Add an env var for playwright worker count (#3408)
On my machine, '66%' is 15 workers. This setting can be overwritten at runtime with a flag, but because I virtually never want to use that many, an env var will save me some keystrokes over time.
1 parent 16b3d16 commit 5147e77

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎playwright.config.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export default {
1818
// Retry on CI only
1919
retries: process.env.CI ? 2 : 0,
2020
// use all available cores (2) on github actions. use fewer locally
21-
workers: process.env.CI ? '100%' : '66%',
21+
workers: process.env.PLAYWRIGHT_WORKER_COUNT
22+
? parseInt(process.env.PLAYWRIGHT_WORKER_COUNT, 10)
23+
: process.env.CI
24+
? '100%'
25+
: '66%',
2226
timeout: (process.env.CI ? 60 : 30) * 1000, // shorter timeout locally
2327
fullyParallel: true,
2428
// default is 5 seconds. somehow playwright really hates async route modules,

0 commit comments

Comments
 (0)