Skip to content

Commit

Permalink
fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
aviv-moataznabil committed Jul 25, 2024
1 parent 3efdb8d commit 1299d92
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Playwright Tests

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
Expand All @@ -21,12 +27,12 @@ jobs:
npx playwright install
- name: Run Playwright tests
run: |
npx playwright test
run: npx playwright test

- name: Upload Playwright report
if: always() # This ensures that the report is uploaded even if tests fail
uses: actions/upload-artifact@v3
- name: Deploy Playwright report to GitHub Pages
if: always()
uses: peaceiris/actions-gh-pages@v3
with:
name: playwright-report
path: playwright-report
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playwright-report
publish_branch: gh-pages
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default defineConfig({
},
reporter: [
['list'],
['html', { outputFolder: 'playwright-report' }],
['json', { outputFile: 'test-results.json' }],
['junit', { outputFile: 'test-results.xml' }],
['html', { outputFolder: 'playwright-report', open: 'never' }]
],

retries: 2,
Expand Down

0 comments on commit 1299d92

Please sign in to comment.