diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc0a291395..e723882fa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,4 +82,9 @@ jobs: - name: Run Playwright tests env: PLAYWRIGHT_TEST_URL: http://localhost:5000/ - run: npx playwright test --project=chrome \ No newline at end of file + run: npx playwright test --project=chrome + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ \ No newline at end of file diff --git a/playwright.config.js b/playwright.config.js index 8701a20512..e35c9d9f22 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -22,7 +22,11 @@ module.exports = defineConfig({ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ /* Uses 'github' for GitHub Actions CI to generate annotations, otherwise 'html' */ - reporter: process.env.CI && process.env.PLAYWRIGHT_TEST_URL === 'http://localhost:5000/' ? 'github' : 'html', + reporter: [ + [ 'html' ], + ...(process.env.CI && process.env.PLAYWRIGHT_TEST_URL === 'http://localhost:5000/' + ? [ [ 'github' ] ] : []) + ], /* 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('/')`. */