GitHub Integration

SpeedCurve's GitHub integration makes running performance tests against your pull requests a seamless experience. It works by hooking into GitHub environment deployments that are associated with a pull request, and running SpeedCurve tests against the environment. This allows you to test the performance of your pull requests before they are merged.

To use the SpeedCurve GitHub integration, there are three steps:

  1. Install the SpeedCurve CI GitHub app
  2. Link a SpeedCurve site to one of your GitHub repositories
  3. Push code to a pull request in that repository

Installing the SpeedCurve CI GitHub app

To use SpeedCurve's GitHub integration, you'll first need to install the SpeedCurve CI GitHub app. To do this, navigate to your SpeedCurve settings page and scroll down to the Integrations section.

Click the Connect button. You will be redirected to GitHub, where you can complete the installation process.

Once you have completed the installation process in GitHub, you should be taken back to your SpeedCurve settings page, where you will see the connected GitHub account.

Linking a SpeedCurve site to a GitHub repository

Once you have installed the SpeedCurve CI GitHub app, you will be able to link your SpeedCurve sites to your GitHub repositories. To do this, go to your SpeedCurve settings page and click on the site that you want to link to a GitHub repository. Scroll down to the Integrations section and choose the GitHub repository that you want to link.

Once you have selected a repository, click the Save button at the bottom of the page to complete the process.

Receiving SpeedCurve performance reports on pull requests

When you have linked a SpeedCurve site to a GitHub repository, SpeedCurve will run performance tests every time a deployment is made for a pull request. You will see something like this when the pull request has a successful deployment:

Once SpeedCurve receives the deployment information, it will trigger a round of testing against that deployment. You will be see the tests in your Deployments dashboard in SpeedCurve:

Once the SpeedCurve tests have finished, a performance report will be delivered as a comment on the pull request. It will look something like this:

Troubleshooting

I opened a pull request but SpeedCurve has not started any tests

Possible problems and solutions:

Your site is not connected to the repository

Please make sure you have the selected repository in your site settings. Go to the site you would like to trigger tests for, scroll down to the Integrations section and make sire that "GitHub repository" dropdown field shows the repository you opened the pull request in.

Your deployments are not fully supported by GitHub

SpeedCurve will only run tests against pull requests that have a deployment. Some platforms like Heroku and Vercel fully integrate with GitHub and create a deployment for pull requests. Other platforms like Netlify and Render do not fully integrate with GitHub.

For platforms that don't fully integrate with GitHub, you may be able to create a deployment with a GitHub Actions workflow. SpeedCurve has an example workflow that creates a GitHub deployment for Netlify deploy previews. If you use Netlify, this workflow may "just work" for you. For other platforms it may help as a starting point.

My pull request has a deployment but SpeedCurve has not started any tests

SpeedCurve will only run tests against successful deployments. Your pull request will have the message This branch was successfully deployed when a deployment was successful.

If your deployment is still in progress, SpeedCurve will wait until it has succeeded before running the tests.

If your deployment is outdated or failed, SpeedCurve will not run tests for it.

My integration is not showing after redirecting to the settings page

If you went through the installation process on GitHub and installed the SpeedCurve CI app, and after getting back to your Setting page the integration is not showing (instead, you see the 'Connect' button), try to remove the SpeedCurve CI app from your installed apps on GitHub and repeat the process.

Depending on the type of your GitHub account (user or organization) you can find all installed apps by going to the Settings and then either to Integrations -> Applications, or Third-party Access -> GitHub Apps section. Click 'Configure' next to the SpeedCurve CI app, scroll down and click the red 'Uninstall' button.

Known limitations

Our GitHub integration is currently in its first iteration and has some known limitations. Please get in touch with us at [email protected] if you have any feedback about changes or new features you'd like to see in our GitHub integration - we'd love to hear from you!

Only one SpeedCurve team can be linked to a GitHub account

Right now we only support having one SpeedCurve team linked to a GitHub account or organization at a time. If you want to change which SpeedCurve team is linked to a GitHub account, you will need to uninstall the SpeedCurve CI GitHub app from the first team and install it again to the second team.

SpeedCurve tests are only run when a pull request has a deployment

Tests will only be run against pull requests that have a related GitHub deployment. Tests will not be run against deployments that exist outside of a pull request. You can tell if a pull request has a related deployment by looking for the following at the bottom of a pull request:

If you use a tool like Netlify or Render which does not use GitHub deployments, you can use the GitHub Deployments action to create a deployment for your pull requests. SpeedCurve has an example repository that shows how to do this for Netlify deployments.

SpeedCurve tests are run every time a GitHub environment is updated

If a pull request's environment is deployed to multiple times, SpeedCurve's GitHub integration will run multiple rounds of tests against that environment.