From ec44e21bd8fdf052b671cca14b50bd85ea5b8ae0 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 23 Oct 2024 11:16:30 +0800 Subject: [PATCH] chore: updated config --- playwright.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index 994bd17..b4b91c2 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,6 +12,7 @@ dotenv.config({ path: path.resolve(__dirname, '.env') }); const headless = process.env.HEADLESS?.toLowerCase() !== 'false' && process.env.HEADLESS !== '0'; const timeout = Number(process.env.TIMEOUT) || 30000; +const workers = process.env.WORKERS ? Number(process.env.WORKERS) : (process.env.CI ? 10 : undefined); /** * See https://playwright.dev/docs/test-configuration. @@ -25,7 +26,7 @@ export default defineConfig({ /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, + workers, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */