mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-06 19:14:55 +10:00
dfd2c77bc9
* docs: design e2e test setup Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * docs: plan e2e test implementation Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: add playwright e2e scripts Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: configure playwright Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: add core e2e fixtures and specs Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * ci: run e2e tests on pull requests Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * [autofix.ci] apply automated fixes * test: stabilize e2e suite Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: ignore playwright artifacts Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * Update .github/workflows/e2e.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * test: address e2e review feedback Co-authored-by: Amruth Pillai <im.amruth@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
89 lines
2.1 KiB
YAML
89 lines
2.1 KiB
YAML
name: E2E Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ["main"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
APP_URL: http://localhost:3000
|
|
PORT: "3000"
|
|
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
|
|
FLAG_DISABLE_SIGNUPS: "false"
|
|
FLAG_DISABLE_EMAIL_AUTH: "false"
|
|
FLAG_DISABLE_API_RATE_LIMIT: "true"
|
|
LOCAL_STORAGE_PATH: /tmp/reactive-resume-e2e-storage
|
|
|
|
jobs:
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd "pg_isready -U postgres -d postgres"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v6
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright Browser
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Generate Test Secrets
|
|
run: |
|
|
echo "AUTH_SECRET=$(openssl rand -hex 32)" >> "$GITHUB_ENV"
|
|
echo "ENCRYPTION_SECRET=$(openssl rand -hex 32)" >> "$GITHUB_ENV"
|
|
|
|
- name: Prepare Storage
|
|
run: mkdir -p "$LOCAL_STORAGE_PATH"
|
|
|
|
- name: Run Database Migrations
|
|
run: pnpm db:migrate
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Run E2E Tests
|
|
run: pnpm test:e2e:ci
|
|
|
|
- name: Upload Playwright Report
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: playwright-report
|
|
path: |
|
|
playwright-report
|
|
test-results
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|