WorkFlow Update #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Playwright Tests and Publish Report to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install | |
- name: Install Playwright browsers | |
run: npx playwright install | |
- name: Run Playwright tests for Chromium | |
run: npx playwright test --project=chromium --workers=4 | |
continue-on-error: true # Ensures workflow continues even if tests fail | |
- name: Move HTML Report | |
run: mv playwright-report /tmp/playwright-report | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages # Corrected parameter | |
publish_dir: /tmp/playwright-report # Corrected parameter |