Enable Pull Request Integration
Learn how to enable pull request integration to add status checks and testing information right in each pull request.
We'll cover the following
To add status checks and pull request comments, including screenshots of failed tests, right in each pull request, Cypress provides a GitHub app.
Installation
The installation process consists of a few steps, mainly to grant Cypress permissions to your repository and to connect a Cypress project with the repository.
Cypress provides excellent documentation, including up-to-date screenshots of this process. Please follow their instructions.
Commit a failed test
To see the continuous integration and pull request comments in action for a failed test:
- Create a new temporary branch.
git switch -c demo-branch
- Make one of the tests fail, similarly to how we did that earlier. In the
services/web/cypress/integration/spec.js
file change the first test from:
cy.contains('h1', 'Great success!')
to
cy.contains('h1', 'No great success!')
- Commit and push the change.
git add .
git commit -m "failed a test"
git push --set-upstream origin demo-branch
Get hands-on with 1400+ tech skills courses.