Skip to content

Playwright Tests

Playwright Tests #188

name: Playwright Tests
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
schedule:
# Run daily at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- 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
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
# Done as part of npm run test:x
# - name: Build project
# run: npm run build
- name: Run unit tests
run: npm run test:unit
- name: Run E2E tests
run: xvfb-run npm run test:e2e
env:
CI: true
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 30