Task 8: Pull Request Checks
In this task the pull request runs what is too slow for every push.
Add a database
- TODO: PostgreSQL in place of the Task 1 storage, or keep SQLite and skip this.
Run the integration tests
- Start the image built in
image-build, and a database as a service container. - Call every route over HTTP, end to end.
- TODO: pass the image between jobs: an artifact, or a registry tag.
Require the checks
Until now the merge waited only for the approval. From here it waits for the checks as well.
- Settings → Branches, and edit the branch protection rule on
mainfrom Task 3. - Two settings:
- Require status checks to pass before merging, and pick the jobs of
pr.ymlby name:lint,unit-tests,image-build,integration-tests. Task 9 chooses which of its own checks join them. - Require branches to be up to date before merging: the pull request's checks then ran on the code that
lands on
main, so the merge workflow need not test it again.
- Require status checks to pass before merging, and pick the jobs of
- Save changes.
- A check is in the list only after it has run once: the pull request you opened in Task 2 is what put them there.
- A check's name is its job's name. A matrix job adds its value,
unit-tests (3.13), and each of those is a check of its own to require. - A required check that never runs blocks the merge forever. If
pr.ymlever gets apaths:filter, a pull request changing only the README waits for checks that never start.