Skip to content

Update playwright.yml #10

Update playwright.yml

Update playwright.yml #10

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Give the workflow permission to deploy the Pages site
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
# Configure Pages
- name: Configure GitHub Pages
if: always()
uses: actions/configure-pages@v3
# Upload the report as a pages artifact
- name: Upload Pages Artifact
if: always()
uses: actions/upload-pages-artifact@v2
with:
path: playwright-report/
# Deploy the Pages site
deploy:
if: always()
needs: test
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2