Skip to main content

Overview

Connecting Spur to GitHub Actions adds an automated quality gate to your pull request workflow. When a PR is opened or code is pushed, Spur triggers your test plans and reports pass/fail results directly on the pull request. Failing tests block a merge before anything reaches production.

What you get

Automated test execution

Test plans run automatically on every pull request without manual intervention.

PR status checks

Pass/fail results appear directly on your pull requests.

Deployment quality gate

Tests run right before deployment, catching issues before they reach production.

Branch protection

Prevent merging pull requests with failing tests using GitHub branch protection rules.

Setup

1

Go to Integrations

Open the Integrations page in your Spur dashboard and connect GitHub.

Open Spur Integrations

Connect Spur with GitHub to get started
2

Open GitHub settings

Once connected, find GitHub on the integrations page and click Settings.
GitHub integration settings
3

Configure your integration

The GitHub Integration Settings page has four sections. Review each one before proceeding.

API key

Your unique Spur API key is displayed here. This is what authenticates your GitHub repository with Spur. Copy it if you need to reference it manually.

Directory path

The path where your GitHub Actions workflow files will be stored. The default is .github/workflows — leave this as is unless your repository uses a custom structure.

Enabled test plans

Select which test plans should run as part of your CI/CD pipeline. Click + Add Test Plan to include additional ones.

YAML files

Two workflow files are generated for you here. You will download and add these to your repository in the next step.
Other integrations: You can also allow other integrations to be enabled for GitHub jobs.
Enable other integrations for GitHub jobs
GitHub integration configuration
4

Add the YAML files to your repository

Download both YAML files from the settings page and add them to your repository under .github/workflows/.
These two files are what make the integration work. Without them in your repository, Spur will not trigger on pull requests and no quality gate will be in place. Do not skip this step.
  • Report Generation — generates and publishes test reports after each run
  • Test Plan Trigger — tells GitHub when to trigger a Spur test plan run
Adding YAML files to GitHub repository
5

Save changes

Click Save Changes to finalize your integration. From this point, Spur will run your selected test plans automatically on every pull request.

Testing deploy previews

Need to test against a Vercel preview deploy or feature branch URL? Use Override URLs to redirect tests at runtime without changing your environment settings.
- name: Run Spur Tests
  run: |
    curl -X POST \
      -H "Content-Type: application/json" \
      -H "SPUR_GITHUB_KEY: ${{ secrets.SPUR_API_KEY }}" \
      -d "{\"override_urls\": {\"default\": \"${{ steps.deploy.outputs.preview_url }}\"}}" \
      "https://app.spurtest.com/api/webhook"