From ad3e18cb1aa489d9a022bef357becb5d879a8923 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Tue, 7 Feb 2023 01:22:39 +0800 Subject: [PATCH] feat: enable github reporter --- playwright.config.ts | 5 +++++ playwright.config.unit.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/playwright.config.ts b/playwright.config.ts index a8aa070449..1c1ff81bc1 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -39,6 +39,11 @@ const config: PlaywrightTestConfig = { COVERAGE: process.env.COVERAGE || 'false', }, }, + + // 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot' + // default 'list' when running locally + // See https://playwright.dev/docs/test-reporters#github-actions-annotations + reporter: process.env.CI ? 'github' : 'list', }; export default config; diff --git a/playwright.config.unit.ts b/playwright.config.unit.ts index 7a5651b631..69150b1426 100644 --- a/playwright.config.unit.ts +++ b/playwright.config.unit.ts @@ -23,6 +23,11 @@ const config: PlaywrightTestConfig = { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', }, + + // 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot' + // default 'list' when running locally + // See https://playwright.dev/docs/test-reporters#github-actions-annotations + reporter: process.env.CI ? 'github' : 'list', }; export default config;