Skip to content

Commit

Permalink
👷 chore(ci): Archive Playwright reports for E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception committed Oct 5, 2023
1 parent e4dc605 commit b14648c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,12 @@ jobs:

- name: Run E2E tests (headless)
run: pnpm run test:e2e:headless

- name: Archive Playwright reports
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: playwright-reports
path: |
wallets/metamask/playwright-report
if-no-files-found: error
11 changes: 7 additions & 4 deletions wallets/metamask/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ export default defineConfig({
// Opt out of parallel tests on CI.
workers: process.env.CI ? 1 : undefined,

// Concise 'dot' for CI, default 'html' when running locally. See https://playwright.dev/docs/test-reporters.
// Concise 'dot' for CI, default 'html' when running locally.
// See https://playwright.dev/docs/test-reporters.
reporter: process.env.CI ? 'dot' : 'html',

// Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions.
// Shared settings for all the projects below.
// See https://playwright.dev/docs/api/class-testoptions.
use: {
// Collect traces for all failed tests. See https://playwright.dev/docs/trace-viewer.
trace: 'retain-on-failure'
// Collect all traces on CI, and only traces for failed tests when running locally.
// See https://playwright.dev/docs/trace-viewer.
trace: process.env.CI ? 'on' : 'retain-on-failure'
},

// Configure projects for major browsers.
Expand Down

0 comments on commit b14648c

Please sign in to comment.