Installing the Vercel integration
-
Connect GitHub and Vercel
Section titled “Connect GitHub and Vercel”Before adding the workflow, connect both integrations from your organization settings:
- Install the Endform Vercel integration so Endform can find Vercel deployments and create Vercel checks.
- Install the Endform GitHub app for authentication and commit pairing.
Your GitHub Actions workflow also needs
id-token: writeinpermissions. -
Add the workflow step
Section titled “Add the workflow step”Add
endformdev/actions/run-with-vercel-deploymentbeforenpx endform@latest test:.github/workflows/endform-e2e.yml name: Run end to end tests with endformon:pull_request: # or push: if you want to run on commits to mainbranches:- mainpermissions:contents: readid-token: write # required for authentication with Endformjobs:e2e:runs-on: ubuntu-lateststeps:# Checkout, install Node and install dependencies first...- name: Wait for Vercel deploymentuses: endformdev/actions/run-with-vercel-deployment@mainwith:project-name: your-vercel-project-nameset-url-env-var: BASE_URL # Export the preview url for your playwright.config.ts to pick up- name: Run end to end tests with Endformrun: npx endform@latest testYou can find more documentation of the configuration options for the
run-with-vercel-deploymentaction here. -
Configure Playwright
Section titled “Configure Playwright”Point Playwright at the URL exported by the workflow step:
import { defineConfig } from "@playwright/test";export default defineConfig({use: {baseURL: process.env.BASE_URL || "https://your-project.vercel.app",},});
How it works
Section titled “How it works”When the workflow runs, Endform matches the GitHub workflow run to the Vercel deployment for the same commit.
The action then:
- waits until the Vercel deployment is ready
- exports the deployment URL as
BASE_URL, or whichever variable you set withset-url-env-var - configures Endform with a Vercel deployment protection bypass token (through extra headers)
When npx endform@latest test starts, Endform creates a Vercel deployment check for that workflow job.
The check is marked as running while tests execute, then completed with the test result and a link back to the Endform dashboard.
- The workflow must include
endformdev/actions/run-with-vercel-deploymentfor Endform to connect the Vercel deployment to the test run. - The deployment must come from a Git commit that Endform can match to the GitHub workflow.
- Vercel deployment checks created by Endform are currently non-blocking.