ci: add Playwright preview testing pipeline#311
Conversation
Run browser e2e checks against successful Vercel preview deployments so protected staging-backed PR previews are validated before merge. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Consolidates CI by replacing separate Migrates Vitest suites from Reviewed by Cursor Bugbot for commit af46340. Bugbot is set up for automated code reviews on this repo. Configure here. |
Apply formatter output to keep the new Playwright env validation file consistent with repository formatting conventions. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-pass Playwright preview E2E pipeline for the dashboard repo, aimed at running a lightweight browser check when Vercel preview deployments report a successful deployment_status. It adds the Playwright tooling, environment validation, and a GitHub Actions workflow so preview checks can run alongside the existing Bun/Vitest-based test setup.
Changes:
- Added Playwright configuration, dependency wiring, package scripts, and ignored output directories.
- Added a dedicated Playwright environment validation script and a minimal preview smoke spec.
- Added a GitHub Actions workflow that runs on successful non-production deployment status events and uploads Playwright artifacts.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/check-playwright-env.ts |
Adds Playwright-specific env validation for preview runs. |
playwright.config.ts |
Defines Playwright test directory, browser project, base URL, and Vercel bypass header support. |
package.json |
Adds Playwright dependency and scripts for browser install and test execution. |
e2e/preview-config.spec.ts |
Introduces the initial preview smoke/harness spec. |
bun.lock |
Locks the new Playwright packages and transitive dependency updates. |
.gitignore |
Ignores Playwright reports and test output artifacts. |
.github/workflows/e2e-playwright-preview.yml |
Adds the preview-deployment workflow that installs dependencies, runs Playwright, and uploads artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a1b4fd879
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Separate local development Playwright checks from PR-gated preview checks so agents can add many localhost-focused tests without slowing merge validation. Co-authored-by: Cursor <cursoragent@cursor.com>
Run shared validation and auth state bootstrap tests in both dev and PR modes while keeping workflow logs colorized. Co-authored-by: Cursor <cursoragent@cursor.com>
Validate the base URL from Playwright project config so regressions in use.baseURL wiring are caught. Co-authored-by: Cursor <cursoragent@cursor.com>
Standardize workflow naming, move to setup-bun v2, and add Bun/Playwright caches to speed CI runs. Co-authored-by: Cursor <cursoragent@cursor.com>
Combine lint and format into one code-quality workflow with split jobs and include the lint-safe Playwright validation test update. Co-authored-by: Cursor <cursoragent@cursor.com>
Run all test checks from a single workflow with separate Unit, Integration, and Preview jobs for clearer status grouping. Co-authored-by: Cursor <cursoragent@cursor.com>
Move Vitest and Playwright suites under tests/*, remove unused vitest e2e placeholder wiring, and update configs/docs/scripts to the new test layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Update the proxy integration test import to reference next.config.mjs from the new tests directory structure. Co-authored-by: Cursor <cursoragent@cursor.com>
Ensure Playwright runs with the intended mode and preview jobs check out the deployed SHA, while preventing Vitest from picking up Playwright specs. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c5323ca. Configure here.
matthewlouisbrockman
left a comment
There was a problem hiding this comment.
nice playwright! i like to have -test in the names but not breaker
Use a stable preview-environment concurrency group so cancel-in-progress can terminate stale preview runs. Co-authored-by: Cursor <cursoragent@cursor.com>
Separate deployment_status Playwright runs from unit and integration CI so each trigger executes only relevant jobs. Co-authored-by: Cursor <cursoragent@cursor.com>
Update integration job dependency to match the renamed unit job id in test workflow. Co-authored-by: Cursor <cursoragent@cursor.com>

Summary
deployment_statusand targeting Vercel preview URLscommon,dev, andprsuites with shared baseline coverage for baseURL validation, auth setup, and auth-state reuselocalhostdefault + mode-aware env validation) while keeping PR mode strictCode QualityandTest, enable colorized logs, and add Bun/Playwright cachingtests/(unit,integration,development) and remove unused Vitest E2E setupgithub.event.deployment.sha, tightening preview job targeting, and isolating concurrency groups per deployment