Skip to content

Vercel

Run Smoketest after Vercel production or preview deployments.

View as Markdown

There are two useful ways to connect Vercel to Smoketest:

  • Use a Vercel webhook for basic post-deploy testing against the saved test URL.
  • Use GitHub Actions or another CI step when you need a dynamic preview URL, commit SHA, idempotency, and GitHub checks.

Basic mode: Vercel webhook

Use this when each Smoketest test already points at the production or staging URL you want to test.

  1. Create a deployment webhook in Smoketest.
  2. In Vercel, create a project webhook for successful deployment events.
  3. Set the endpoint URL to the Smoketest trigger URL.
  4. Filter to the project and deployment event you want.

Vercel sends its own JSON payload. Smoketest ignores unknown fields and queues the webhook's configured test or tag target. This basic mode does not pass targetUrl, commitSha, or externalId unless you add those fields through another layer.

Full metadata mode: GitHub Actions

Use this when you want Smoketest to run against Vercel preview URLs and create GitHub checks.

.github/workflows/smoketest-vercel.yml
name: Smoketest Vercel deployments

on:
  deployment_status:

jobs:
  smoketest:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    steps:
      - name: Trigger Smoketest
        run: |
          curl -sf -X POST -G "$SMOKETEST_DEPLOYMENT_WEBHOOK_URL" \
            -H "Idempotency-Key: ${{ github.event.deployment.id }}" \
            --data-urlencode "targetUrl=${{ github.event.deployment_status.environment_url }}" \
            --data-urlencode "commitSha=${{ github.sha }}" \
            --data-urlencode "branch=${{ github.ref_name }}" \
            --data-urlencode "externalId=${{ github.event.deployment.id }}"
        env:
          SMOKETEST_DEPLOYMENT_WEBHOOK_URL: ${{ secrets.SMOKETEST_DEPLOYMENT_WEBHOOK_URL }}

When to use the GitHub integration instead

If Vercel preview URLs follow a stable pattern, the GitHub integration can create checks directly from pull requests and wait for the preview URL to become reachable before starting runs.

Use deployment webhooks when Vercel or your deployment pipeline knows the final URL better than a static template can.

On this page