Set cancel-in-progress: true so that updates to a PR cancel still running previous workflow runs. This leads to faster CI feedback, because otherwise the builds are all queued up. Also avoiding double builds caused by the push and pull_request events being activated for all branches and thus in PRs trigger two builds for the same thing.
Noticed this while preparing a PR (in a repo fork) where multiple updates to a PR led to a long waiting time due the queued up builds and double triggers.
Description
Set
cancel-in-progress: true
so that updates to a PR cancel still running previous workflow runs. This leads to faster CI feedback, because otherwise the builds are all queued up. Also avoiding double builds caused by the push and pull_request events being activated for all branches and thus in PRs trigger two builds for the same thing.Inspired by https://github.com/conda/conda/blob/main/.github/workflows/tests.yml#L18
Noticed this while preparing a PR (in a repo fork) where multiple updates to a PR led to a long waiting time due the queued up builds and double triggers.