Skip to content

E2E Full Regression

E2E Full Regression #4

Workflow file for this run

name: E2E Full Regression
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
jobs:
e2e-full:
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: lendq
POSTGRES_PASSWORD: lendq
POSTGRES_DB: lendq_dev
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U lendq -d lendq_dev"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql+psycopg2://lendq:lendq@127.0.0.1:5432/lendq_dev
REDIS_URL: redis://127.0.0.1:6379/0
SECRET_KEY: ci-secret-key
JWT_SECRET_KEY: ci-jwt-secret-key
CORS_ORIGINS: http://127.0.0.1:5173
BASE_URL: http://127.0.0.1:5173
PLAYWRIGHT_WORKERS: 4
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: |
frontend/package-lock.json
e2e/package-lock.json
- name: Install backend dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements-dev.txt
- name: Install frontend dependencies
run: npm ci
working-directory: frontend
- name: Install E2E dependencies
run: npm ci
working-directory: e2e
- name: Prepare database
run: |
python -m flask --app app:create_app db upgrade
python -m app.seed --profile demo
working-directory: backend
- name: Start backend
run: python -m flask --app app:create_app run --host 0.0.0.0 --port 5000 > ../backend.log 2>&1 &
working-directory: backend
- name: Start frontend
run: npm run dev -- --host 0.0.0.0 --port 5173 > ../frontend.log 2>&1 &
working-directory: frontend
- name: Wait for services
run: |
for i in {1..60}; do
if curl -fsS http://127.0.0.1:5000/health/ready >/dev/null && curl -fsS http://127.0.0.1:5173 >/dev/null; then
exit 0
fi
sleep 2
done
echo "Timed out waiting for frontend/backend startup" >&2
exit 1
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox webkit
working-directory: e2e
- name: Run full regression
run: npm run test:full
working-directory: e2e
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-full
path: e2e/playwright-report
if-no-files-found: ignore
- name: Upload service logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-full-logs
path: |
backend.log
frontend.log
if-no-files-found: ignore