From 33b8d1dd31aaaa2e7f89bc2e743375834a9bd440 Mon Sep 17 00:00:00 2001 From: Raphael Schweikert Date: Tue, 19 Nov 2024 12:14:34 +0100 Subject: [PATCH] Make playwright publish a JUnit report --- .github/workflows/check.yml | 2 +- configs/playwright.config.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f4eb5f4..afc8759 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,4 +36,4 @@ jobs: - uses: mikepenz/action-junit-report@v5 if: ${{ !cancelled() }} with: - report_paths: '**/build/test-results/test/TEST-*.xml' + report_paths: '**/build/**/TEST-*.xml' diff --git a/configs/playwright.config.ts b/configs/playwright.config.ts index d4d28c0..f136701 100644 --- a/configs/playwright.config.ts +++ b/configs/playwright.config.ts @@ -20,7 +20,10 @@ async function loadConfig(): Promise { /* 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', { open: process.env.CI ? 'never' : 'on-failure', outputFolder: outputDir }]], + reporter: [ + ['html', { open: process.env.CI ? 'never' : 'on-failure', outputFolder: outputDir }], + ['junit', { outputFile: `${outputDir}/TEST-playwright.xml` }], + ], /* 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('/')`. */