python-tuf
python-tuf copied to clipboard
GitHub Actions: Find and implement fail-fast strategy
Description of issue or feature request:
#1242 added a GitHub Actions based CI workflow, which runs all configured builds in parallel, ignoring each others build results. However, GitHub Actions provides an option (i.e. fail-fast), to abort all builds if any build fails. This option might be useful for specific build relationships, where one failing build is likely to entail other failing builds.
Current behavior:
fail-fast: false
Expected behavior:
Consider fail-fast: true (default) but with specific conditions, e.g. prioritize lint build and abort any other build if that one fails.
Another way to do this would be to make lint and test builds different jobs and configure needs: [<lint job>] on the test job.
I have made some changes in the GitHub actions file to achieve the below intentions.
- Run the lint job as the first job in the matrix.
- Fail all of the follow-up jobs if lint fails.
- Allow failure of other jobs is lint passed.
Please review the PR. Thanks.