ManualContinuous integration
How checks work
Your tests passed on GitHub. Can Berrit land the change now? That depends on which commit the tests ran on.
You may already use continuous integration (CI) to build and test your code. If you want to require a result like “Unit tests passed” before a change lands, add a check to the repository’s checks.toml. Without that file, Berrit has no external checks to wait for. Your CI system runs the tests. Berrit uses the result to decide whether the change can go ahead.
Which code did CI test?
Section titled “Which code did CI test?”The tests for your --timeout option passed when you sent it for review. Since then, someone has renamed the function your flag calls on main. Will the two changes still compile together?
Each check has an on field. This is where you choose the stages at which Berrit needs a result.
| Stage | Commit to test | Question it answers |
|---|---|---|
push |
The revision the author just sent. | Do the tests pass on the code the reviewer is about to read? |
approved |
The current revision once it meets the review requirements. | Do the tests we’ve saved for after review pass on this version? |
train |
The candidate, which includes the changes ahead of this one in the queue. | Does our change still work with everything that will land ahead of it? |
For our timeout option, we’d require a train check so the tests run with the rename in place. You can also select push if you want the author to get results while they’re still editing. If the combined build fails, the merge train walkthrough shows how Berrit finds the change that broke it.
Who starts a GitHub Actions run?
Section titled “Who starts a GitHub Actions run?”- Berrit starts it. Use this if you want Berrit to choose when to spend the runner time. Give it the
workflowfilename. It asks GitHub to start the workflow at the stage you choose and waits for the result of the whole run. Run GitHub Actions - GitHub already starts it. If a pull request already gets the test you want, keep that workflow. Give Berrit the GitHub App and the job’s displayed name. GitHub’s triggers decide when the job runs, and Berrit waits for that job’s result on the expected commit. Use existing CI jobs
Pick one for a given test. If you dispatch the workflow and also trigger it on pushes to Berrit’s branches, pushing the branch can start a second run before Berrit has even asked for the first one. Keep the push trigger on the branches where you actually want independent runs.
On the change, open Checks to see the stage and status of each check. If your CI system supplied a link, Details takes you to the result. If GitHub shows a green job and Berrit is still waiting, compare the job name and commit with the ones Berrit asked for. Troubleshoot setup