Skip to content

Playwright Regression #40

Playwright Regression

Playwright Regression #40

name: Playwright Regression
on:
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
inputs:
run_smoke:
type: boolean
description: 'Run smoke journeys'
default: true
run_accessibility:
type: boolean
description: 'Run accessibility suite'
default: true
permissions:
contents: read
checks: write
actions: read
pull-requests: read
jobs:
smoke-and-a11y:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run accessibility regression (@axe + navigation)
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run_accessibility == 'true')
env:
PLAYWRIGHT_HTML_REPORT: playwright-report/a11y
run: npm run test:a11y
- name: Run smoke journeys
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run_smoke == 'true')
env:
PLAYWRIGHT_HTML_REPORT: playwright-report/smoke
run: npm run test:smoke
- name: Upload Playwright reports
if: always() && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (inputs.run_accessibility == 'true' || inputs.run_smoke == 'true')))
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ github.run_id }}
path: playwright-report
retention-days: 14