Add GitHub Actions workflow for Playwright E2E tests#174
Conversation
Add automated E2E testing to CI/CD pipeline that runs on pull requests. Changes: - Create .github/workflows/e2e.yml workflow - Run Playwright tests on PRs to main/develop branches - Test on Chromium browser for fast feedback (~5-10 min) - Cache npm dependencies and Playwright browsers - Upload test artifacts (screenshots, videos, traces) on failure - Use GitHub secrets for Supabase configuration Setup Required: Add the following secrets in GitHub repository settings: - NEXT_PUBLIC_SUPABASE_URL - NEXT_PUBLIC_SUPABASE_ANON_KEY Benefits: - Catches regressions before merge - Automated browser testing on every PR - Test results annotated in PR checks - Debug artifacts available when tests fail 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds/updates a GitHub Actions workflow to run Playwright end-to-end tests on PRs to main/develop and via manual dispatch. Configures Node.js 20, installs dependencies, caches Playwright browsers, conditionally installs Chromium browsers/deps, runs Chromium-only tests with CI and Supabase secrets, and uploads artifacts on failure. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Job as e2e-tests (ubuntu-latest)
participant PW as Playwright (chromium)
participant Art as Artifacts
Dev->>GH: Open PR to main/develop or manual dispatch
GH->>Job: Start workflow (timeout 20m)
Job->>Job: Checkout repository
Job->>Job: Setup Node.js 20.x (npm cache)
Job->>Job: npm ci
Job->>Job: Restore Playwright browser cache
alt Cache miss
Job->>PW: Install Chromium browsers
else Cache hit
Job->>PW: Install Chromium deps only
end
Job->>PW: Run tests (npm run test:e2e --project=chromium) with CI + Supabase secrets
alt Tests fail
Job->>Art: Upload `playwright-report/` & `test-results/` (7 days)
else Tests pass
Job->>GH: Mark job success
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR adds automated Playwright E2E testing to the CI/CD pipeline through a GitHub Actions workflow, ensuring end-to-end tests run on every pull request to provide early regression detection before code is merged.
- Created GitHub Actions workflow for automated E2E testing on pull requests
- Configured Chromium-only testing for fast feedback with caching optimizations
- Added test artifact uploads and GitHub secrets integration for Supabase configuration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/e2e.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Playwright E2E Tests
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
This PR adds automated Playwright E2E testing to the CI/CD pipeline, ensuring tests run on every pull request before merging.
Changes
.github/workflows/e2e.ymlworkflow filemainanddevelopbranchesSetup Required ⚙️
Before merging, add the following secrets in GitHub repository settings (Settings → Secrets and variables → Actions):
NEXT_PUBLIC_SUPABASE_URL- Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Your Supabase anonymous keyThese should point to a test/staging Supabase project, not production.
Benefits 🎯
Future Enhancements 🚀
This can be expanded later to:
Test Plan
forbidOnly, retries, GitHub reporter)Recommended: Branch Protection
Consider requiring this workflow to pass before merging:
main(anddevelop)🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Chores