name: E2E Tests on: pull_request: branches: [main] paths: - 'frontend/**' - 'backend/**' - '.github/workflows/e2e.yml' # Minimal permissions for security permissions: contents: read jobs: e2e: name: Playwright E2E runs-on: ubuntu-latest timeout-minutes: 15 permissions: contents: read steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22' cache: 'npm' cache-dependency-path: | backend/package-lock.json frontend/package-lock.json - name: Install backend dependencies working-directory: backend run: npm ci - name: Install frontend dependencies working-directory: frontend run: npm ci - name: Install Playwright browsers working-directory: frontend run: npx playwright install --with-deps chromium - name: Run E2E tests (Chromium only) working-directory: frontend run: npx playwright test --project=chromium env: CI: true JWT_SECRET: e2e-test-secret-that-is-long-enough SESSION_SECRET: e2e-test-session-secret-long-enough - name: Upload Playwright report uses: actions/upload-artifact@v4 if: always() with: name: playwright-report path: frontend/playwright-report/ retention-days: 7 - name: Upload test results uses: actions/upload-artifact@v4 if: always() with: name: playwright-results path: frontend/test-results/ retention-days: 7