Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Action for Vercel preview deployment e2e testing #446

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Resolves #445

This PR adds a GitHub Action workflow that waits for Vercel preview deployments to complete and then runs e2e tests against the preview URL. The workflow:

  1. Triggers on successful deployment_status events for preview environments
  2. Sets up Node.js and pnpm
  3. Installs Playwright dependencies
  4. Runs e2e tests against the Vercel preview URL

Also adds a new e2e test file that tests:

  • Base path (home page)
  • API endpoints
  • Website paths

Link to Devin run: https://app.devin.ai/sessions/fc3bf7f6915448d39a00af6ba6368f1b
Requested by: Nathan Clevenger ([email protected])

Copy link

vercel bot commented Mar 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 31, 2025 9:49pm

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@nathanclevenger
Copy link
Member

we should add e2e tests for APIs that just use fetch

Also, there is a new secret in Github Actions for VERCEL_AUTOMATION_BYPASS_SECRET ... you can bypass vercel protection by adding that to a header called x-vercel-protection-bypass

for playwright, we can:

const config: PlaywrightTestConfig = {
  use: {
    extraHTTPHeaders: {
      'x-vercel-protection-bypass': process.env.VERCEL_AUTOMATION_BYPASS_SECRET,
      'x-vercel-set-bypass-cookie': true | 'samesitenone' (optional)
    }
  }
}

finally, let's shorten the action name to Vercel E2E Tests

try {
const baseUrl = process.env.BASE_URL || 'http://localhost:3000'

const apiEndpoints = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add / and /api

@nathanclevenger
Copy link
Member

should you pull latest from main on this branch? a lot has changed on main

Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests Vercel Preview Deployment
1 participant