Skip to content

Commit

Permalink
ci: saving screenshots of failing tests (#964)
Browse files Browse the repository at this point in the history
* test: saving screenshots of failing tests

* test: corrected output directory

* test: fix output directory path

* test: using artifacts upload v4

* test: reverting to older ubuntu version

* test: lowering artifacts retention days
  • Loading branch information
Lunkan89 authored Jan 16, 2025
1 parent d1c28bb commit febb7a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -33,3 +33,10 @@ jobs:
if: always()
with:
report-file: ./packages/core/results.json

- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-output
path: ./packages/core/test-results/output ## Folder used in playwright.config.js `outputDir`
retention-days: 1
2 changes: 2 additions & 0 deletions packages/core/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const config: PlaywrightTestConfig = {
use: {
baseURL: 'http://localhost:3333',
browserName: 'chromium',
screenshot: 'only-on-failure',
},
outputDir: './test-results/output',
webServer: {
command: 'serve -p 3333',
port: 3333,
Expand Down

0 comments on commit febb7a5

Please sign in to comment.