Skip to content

Commit

Permalink
Merge pull request #1881 from dscho/upload-playwright-results-in-pr-b…
Browse files Browse the repository at this point in the history
…uilds

Upload playwright results in PR builds
  • Loading branch information
ttaylorr authored Sep 26, 2024
2 parents 5b1041a + 9e694c5 commit ca3b63f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,9 @@ jobs:
- name: Run Playwright tests
env:
PLAYWRIGHT_TEST_URL: http://localhost:5000/
run: npx playwright test --project=chrome
run: npx playwright test --project=chrome
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
6 changes: 5 additions & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('/')`. */
Expand Down

0 comments on commit ca3b63f

Please sign in to comment.