diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc987658..7a07c92d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,10 @@ on: branches: [main] workflow_dispatch: +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: lint-and-typecheck: runs-on: ubuntu-latest @@ -36,28 +40,3 @@ jobs: - run: npm run build - name: Run E2E tests (functional only) run: npx playwright test --grep-invert "Visual Regression" - - visual-regression: - runs-on: ubuntu-latest - env: - NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} - NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} - NEXT_PUBLIC_CHAIN_ID: "8453" - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - - run: npm ci - - run: npx playwright install --with-deps chromium - - run: npm run build - - name: Run visual regression - run: npx playwright test e2e/visual-regression.spec.ts --update-snapshots - - name: Upload snapshots - if: always() - uses: actions/upload-artifact@v4 - with: - name: visual-regression-snapshots - path: e2e/__snapshots__/ - retention-days: 30 diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index fd9dc5c6..fbd8504f 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -3,9 +3,14 @@ name: Update Visual Snapshots on: workflow_dispatch: +concurrency: + group: visual-snapshots + cancel-in-progress: true + jobs: update-snapshots: runs-on: ubuntu-latest + timeout-minutes: 15 env: NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} diff --git a/CLAUDE.md b/CLAUDE.md index 993b0586..60ca5861 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,7 +21,8 @@ src/ page.tsx # Home page .github/ workflows/ - ci.yml # Lint + type-check on PRs + ci.yml # Lint + type-check + e2e on PRs + update-snapshots.yml # Visual regression (manual-only) ``` ## Commands @@ -33,6 +34,10 @@ npm run lint # ESLint npm run typecheck # TypeScript type-check (tsc --noEmit) ``` +## CI / Visual Regression + +PR CI runs `lint-and-typecheck` and `e2e` only. Visual regression snapshots are **manual-only** — trigger the `Update Visual Snapshots` workflow via GitHub Actions or `gh workflow run update-snapshots.yml` when a change is likely to impact UI layout. + ## Design System Terminal aesthetic: dark background (`#0a0a0a`), monospace font (Geist Mono), green accent (`#00ff88`), outline-based UI. CSS custom properties defined in `src/app/globals.css`.