Trigger the Meticulous tests by manually creating deployments on GitHub

If you're using GitHub, and you have the ability to generate public URLs that serve up the code at a particular commit, then you can trigger the Meticulous tests by manually creating deployments on GitHub. By tagging commits in your repository with a link to the deployment URL Meticulous can then automatically run the tests for that commit, and compare the results of the tests between commits to your feature branches and the corresponding base commit on the main/master branch.

If you're using Vercel with the Vercel GitHub integration then you can skip this guide: Vercel will automatically tag GitHub commits with the deployments it creates, and Meticulous will work out of the box.

How to manually create deployments on GitHub

To begin with:

  1. Make sure you have the Meticulous GitHub app installed.
  2. Create a GitHub personal access token with read & write permissions for 'Deployments and deployment statuses' or the repo_deployment scope. You can create a token here. You can use this token as the bearer token in your requests to the GitHub API.

For every commit pushed to a pull request and every commit pushed to the main/master branch, you'll need to setup your CI to:

  1. Create a deployment for the commit. You'll need to provide the commit SHA as the 'ref', and you can pass 'meticulous-tests' as the 'environment' (or some other name that will allow you to distinguish it from other environments).
  2. Create a status for your new deployment. Set the state to 'in_progress'.
  3. Create a public URL that serves up the version of the web application at this commit. If this commit is on the main/master branch then this URL will need to be long lived, since future pull requests may compare against it. In order to avoid false positive diffs you'll need to make sure to build your app with the same configuration for all commits.
  4. Update the status by calling the create status endpoint again. This time set the state to 'success', and the environment_url to the URL that serves up the commit.

Once this has executed you should see the new environment name show up on your project settings page under 'Environments to test against'. Tick the checkbox for this environment, and untick the others, and tick the ' Run Meticulous tests in the cloud' checkbox.

Meticulous will now monitor for new pull requests and new deployments, run the tests against the new deployment when it sees one, and post a link to the results as a comment to your pull request.

Where can I reach out for support?

Reach out to eng@meticulous.ai and we'll be happy to help. You can also join our community discord.