👷 Improve Playwright CI speed: sharding (paralel runs), run in Docker to use cache, use env vars (#1405)

This commit is contained in:
Sebastián Ramírez
2024-10-25 23:56:34 +02:00
committed by GitHub
parent d3d370cad0
commit e684f3c8d6
11 changed files with 121 additions and 27 deletions

View File

@@ -1,11 +1,10 @@
import { defineConfig, devices } from '@playwright/test';
import 'dotenv/config'
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
@@ -21,7 +20,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: process.env.CI ? 'blob' : 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */