diff --git a/playwright.config.ts b/playwright.config.ts index e6dcc5249..7be29e072 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -39,7 +39,14 @@ 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", + // On CI, `list` prints a line per test as it finishes, which keeps the job + // log moving; `github` annotates failures on the PR; `html` is uploaded as + // an artifact and must never try to open a browser there. + reporter: process.env.CI + ? [["list"], ["github"], ["html", { open: "never" }]] + : [["list"], ["html"]], + /* Stop a broken run early on CI instead of waiting out every retry. */ + maxFailures: process.env.CI ? 5 : undefined, /* 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('/')`. */