Skip to content

Commit ca3b63f

Browse files
authored
Merge pull request #1881 from dscho/upload-playwright-results-in-pr-builds
Upload playwright results in PR builds
2 parents 5b1041a + 9e694c5 commit ca3b63f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,9 @@ jobs:
8282
- name: Run Playwright tests
8383
env:
8484
PLAYWRIGHT_TEST_URL: http://localhost:5000/
85-
run: npx playwright test --project=chrome
85+
run: npx playwright test --project=chrome
86+
- uses: actions/upload-artifact@v4
87+
if: always()
88+
with:
89+
name: playwright-report
90+
path: playwright-report/

playwright.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module.exports = defineConfig({
2222
workers: process.env.CI ? 1 : undefined,
2323
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2424
/* Uses 'github' for GitHub Actions CI to generate annotations, otherwise 'html' */
25-
reporter: process.env.CI && process.env.PLAYWRIGHT_TEST_URL === 'http://localhost:5000/' ? 'github' : 'html',
25+
reporter: [
26+
[ 'html' ],
27+
...(process.env.CI && process.env.PLAYWRIGHT_TEST_URL === 'http://localhost:5000/'
28+
? [ [ 'github' ] ] : [])
29+
],
2630
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2731
use: {
2832
/* Base URL to use in actions like `await page.goto('/')`. */

0 commit comments

Comments
 (0)