Skip to content

feat(43): Add e2e tests with playwright #13

feat(43): Add e2e tests with playwright

feat(43): Add e2e tests with playwright #13

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: db
POSTGRESQL_FSYNC: "off"
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install npm
run: npm ci
- name: Build up the application
run: docker compose up -d
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Stop application
if: always()
run: docker compose down