Skip to content

Installing the Vercel integration

  1. Before adding the workflow, connect both integrations from your organization settings:

    Your GitHub Actions workflow also needs id-token: write in permissions.

  2. Add endformdev/actions/run-with-vercel-deployment before npx endform@latest test:

    .github/workflows/endform-e2e.yml
    name: Run end to end tests with endform
    on:
    pull_request: # or push: if you want to run on commits to main
    branches:
    - main
    permissions:
    contents: read
    id-token: write # required for authentication with Endform
    jobs:
    e2e:
    runs-on: ubuntu-latest
    steps:
    # Checkout, install Node and install dependencies first...
    - name: Wait for Vercel deployment
    uses: endformdev/actions/run-with-vercel-deployment@main
    with:
    project-name: your-vercel-project-name
    set-url-env-var: BASE_URL # Export the preview url for your playwright.config.ts to pick up
    - name: Run end to end tests with Endform
    run: npx endform@latest test

    You can find more documentation of the configuration options for the run-with-vercel-deployment action here.

  3. 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",
    },
    });

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 with set-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-deployment for 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.