feat: implement end-to-end testing infrastructure with Playwright and automated containerized database setup

This commit is contained in:
ramvignesh-b
2026-04-15 01:00:51 +05:30
parent 0fb31b9f0b
commit c259d98acb
11 changed files with 389 additions and 7 deletions
+43
View File
@@ -61,3 +61,46 @@ jobs:
run: uv run ruff check
- name: Run Tests
run: uv run python manage.py test
e2e:
name: E2E Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: piku_e2e
POSTGRES_USER: piku_test
POSTGRES_PASSWORD: piku_test
ports:
- 5433:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mailpit:
image: axllent/mailpit:latest
ports:
- 8025:8025
- 1025:1025
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- uses: oven-sh/setup-bun@v2
- name: Install Frontend dependencies
run: cd frontend && bun install
- name: Install Playwright Browsers
run: cd frontend && bun x playwright install --with-deps
- name: Create .env.e2e
run: cp .env.e2e.example .env.e2e
- name: Run E2E Script
run: ./scripts/run-e2e.sh
env:
CI: "true"
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30