mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
feat: implement end-to-end testing infrastructure with Playwright and automated containerized database setup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user