Trigger visual tests from CI/CD
Learn how to integrate Percy with a variety of available CI/CD tools
Percy works best when integrated into your CI workflow, running continuously alongside your test suite. Percy integrates with all common CI providers and can be configured for custom environments.
Supported CI integrations
You can integrate Percy with the following CI services:
Integrate Percy with Jenkins.
Integrate Percy with Azure Pipelines.
Integrate Percy with Circle CI.
Integrate Percy with Bitbucket Pipeline.
Integrate Percy with Travis CI.
Integrate Percy with GitHub Actions.
Integrate Percy with GitLab CI.
Integrate Percy with AppVeyor.
Integrate Percy with Harness CI.
Integrate Percy with Semaphore.
Integrate Percy with Buildkite.
Integrate Percy with CodeShip.
Integrate Percy with Netlify.
Integrate Percy with Other CI-CD tool.
Click each CI service to see step-by-step integration instructions.
Protip
Don’t see your CI service? We’re constantly adding support for CI services. Reach out to support to see if yours is on the way.
How it works
Percy is designed to integrate with your tests and CI environment to run continuous visual reviews. After you add Percy to your tests and your CI environment, Percy starts receiving and rendering screenshots every time a CI build runs.
Configure CI environment variables
To enable Percy, configure the environment variable, ‘PERCY_TOKEN’, in your CI service. This is our write-only API token unique for each Percy project and should be kept secret.
You can find PERCY_TOKEN
in your project settings.
Start and stop Percy CLI
There are two ways to start and stop Percy CLI from your CI setup:
Percy execution command
Add the percy exec command in your configuration file (for example, make file, package.json, or req.txt) to start Percy, as shown below:
In your pipeline script, make changes similar to the following:
Percy start and stop commands
If you cannot use the percy exec command in your configuration file, use the percy exec:start and percy exec:stop commands.
In this case, your configuration file looks as follows:
And your pipeline script should be similar to the following:
The above script performs the following actions:
- Install Percy CLI.
- Start Percy CLI with PERCY_TOKEN.
- Run your tests.
- Stop Percy CLI.
Parallel test suites
Percy automatically supports most parallelized test environments. Snapshots are pushed from your tests to Percy and rendered for you to review in the same Percy build, no matter if your tests are run in different processes or even on different machines. You can also simply configure Percy to support complex parallelization setups.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!