Skip to main content

Overview

Connecting Spur to your CI/CD pipeline adds an automated quality gate right before deployment. When a pull request is opened or code is pushed, Spur triggers your test plans and reports results directly in your repository. Failing tests block a merge before anything reaches production.

GitHub

Set up GitHub Actions to run test plans on every pull request.

GitLab

Set up GitLab CI/CD to run test plans on every merge request.

Override URLs

Redirect tests to deploy previews or feature branch URLs at runtime.

Triggering via webhook

As an alternative to the GitHub Actions or GitLab pipeline files, you can trigger Spur test plans directly using a curl request to the Spur webhook. This is useful if you use a CI/CD provider other than GitHub or GitLab, or if you want more control over when tests are triggered. Send a POST request to the Spur webhook endpoint with your API key (found on the GitHub Integration Settings page in Spur):
curl -X POST \
  -H "Content-Type: application/json" \
  -H "SPUR_GITHUB_KEY: <YOUR_API_KEY>" \
  -d '{
    "override_urls": {
      "default": "https://my-app-pr-42.vercel.app"
    }
  }' \
  "https://app.spurtest.com/api/webhook"
The override_urls body is optional — include it to redirect tests to a different URL (such as a deploy preview) without changing your environment settings. See Override URLs for the full configuration options.
You can use this webhook in any CI/CD system, including Jenkins, CircleCI, Bitbucket Pipelines, or custom deployment scripts.