Skip to content

Run Playwright e2e on Vercel preview deployments (deployment_status) - #170

Merged
mkayander merged 4 commits into
mainfrom
cursor/e2e-vercel-preview-8f0a
Aug 22, 2026
Merged

Run Playwright e2e on Vercel preview deployments (deployment_status)#170
mkayander merged 4 commits into
mainfrom
cursor/e2e-vercel-preview-8f0a

Conversation

@mkayander

@mkayander mkayander commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Hooks Playwright e2e into each successful Vercel preview deployment via GitHub's deployment_status event.

Changes

  • .github/workflows/e2e-preview.yml — auto-runs on Preview deploy success; HTML report artifact
  • vercelPreviewHeaders — Deployment Protection bypass for CI and preview-smoke
  • useProjectPanelDatausePagesRouterCompat + usePlaygroundRoute instead of next/router (fixes App pilot playground __next_error__)
  • Playwright config skips local dev server/Postgres when PLAYWRIGHT_BASE_URL is set

One-time setup

Add GitHub secret VERCEL_AUTOMATION_BYPASS_SECRET (Vercel → Deployment Protection → Protection Bypass for Automation).

Testing

  • pnpm lint — 0 errors
  • Vitest — 90 files / 451 tests
  • pnpm test:e2e7/7 locally (including playground pilot)
  • E2E workflow re-runs on next Vercel preview deploy
Open in Web Open in Cursor 

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dstruct Ready Ready Preview Aug 22, 2026 7:30pm

@mkayander
mkayander marked this pull request as ready for review August 22, 2026 19:13
cursoragent and others added 2 commits August 22, 2026 19:14
- Add .github/workflows/e2e-preview.yml: waits for preview 200, runs test:e2e
- vercelPreviewHeaders helper for Deployment Protection bypass (CI + preview-smoke)
- Skip Postgres globalSetup and webServer when PLAYWRIGHT_BASE_URL is set
- Document e2e/preview-smoke in AGENTS.md

Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
next/router throws under App Router (NextRouter not mounted), causing
__next_error__ on pilot playground e2e. Use usePagesRouterCompat +
usePlaygroundRoute for isRouteReady on App vs Pages.

Also emit HTML Playwright report in CI and fix artifact name sha fallback.
Bump checkout/setup-node/cache/upload-artifact to v6/v7 and
pnpm/action-setup to v6 to silence Node 20 deprecation warnings.
Match e2e-preview.yml: checkout/setup-node/cache v6/v7, pnpm/action-setup v6.
@mkayander
mkayander merged commit be8cc2d into main Aug 22, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.384.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants