The Github guidance for handling skipped but required checks is really not helpful. And previously was different, advocating for pairs of jobs when there was path restrictions.
A different mechanism is to have only one required check. It's purpose is to confirm that the other checks on the PR were successful.
-
Have a workflow that looks at all the checks on the current PR, and sets it's status based on the outcomes of the other checks.
-
Confirm there is only one required check:
Settings -> Branches
-
Other checks in the repo can use the usual filtering mechanisms to execute selectively against the PRs where they have value.
This repository has 7 workflows. One that is required
:
- Check the checks - the only
Required
check.
And 6 more that execute selectively based on the paths in the PR:
- 'Check' Bash files
- 'Check' Go files
- 'Check' Java files
- 'Check' Python files
- 'Check' Rust files
- 'Check' SQL files
Example PRs: