Skip to content

chore(tests): add playwright e2e tests #12

chore(tests): add playwright e2e tests

chore(tests): add playwright e2e tests #12

Workflow file for this run

name: Playwright E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
actions: read
checks: write
pull-requests: write
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-cache-universal
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-universal
- name: Pull required Docker images
run: |
docker pull nginx:latest
docker pull busybox:latest
- name: Create Docker volumes for tests
run: |
docker volume create my-app-data
docker volume create cache
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright E2E tests
run: npm run test:e2e
- name: List Playwright report directory
if: always()
run: ls -lR tests/.report || echo "No report directory"
- name: Upload Playwright HTML report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: tests/.report
include-hidden-files: true