Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: E2E Tests

on:
pull_request:
branches:
- trunk
- 'release/**'
- 'feature/**'
- 'claude/**'
push:
branches:
- trunk

# Cancel in-progress runs for the same branch when a new push arrives.
concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e:
name: Playwright E2E (${{ matrix.browser }})
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
browser: [chromium, firefox]

steps:
# ── Checkout & setup ────────────────────────────────────────
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install npm dependencies
run: npm ci

# ── Playwright ──────────────────────────────────────────────
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ matrix.browser }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
playwright-${{ matrix.browser }}-

- name: Install Playwright browser (${{ matrix.browser }})
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps ${{ matrix.browser }}

- name: Install Playwright browser system dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps ${{ matrix.browser }}

# ── Run tests ───────────────────────────────────────────────
- name: Run E2E tests (${{ matrix.browser }})
run: npx playwright test --project=${{ matrix.browser }}
env:
CI: true

# ── Artifacts ───────────────────────────────────────────────
- name: Upload Playwright HTML report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.browser }}
path: tests/e2e/playwright-report/
retention-days: 14

- name: Upload test results (traces & screenshots on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-results-${{ matrix.browser }}
path: tests/e2e/test-results/
retention-days: 7
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ node_modules/

# dotenv environment variables file
.env

# Playwright
tests/e2e/playwright-report/
tests/e2e/test-results/
tests/e2e/dist/
Loading
Loading