Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions/test: allow concurrency for build against "main" branches #710

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 22, 2024

Description

The concurrency setting will cancel running workflows is a new push to the same branch is seen. This is useful to prevent unnecessary workflow runs (as the previous push was superseded, so the outcome is no longer relevant).

However, for the "main" branches (master and 4.0), this workflow cancelling means that if multiple PRs are merged in succession, only the code coverage for the last merge is recorded in Coveralls as the workflow runs on master for the previous merges will have been cancelled.

While in practice, it's not a biggie, it does make it more difficult to identify which commit/merge added or decreased code coverage.

With this in mind, I'm making a small change to the concurrency setting for the test workflow only to allow those to always finish when the workflow is run for the "main" branches.

Suggested changelog entry

N/A

The `concurrency` setting will cancel running workflows is a new push to the same branch is seen. This is useful to prevent unnecessary workflow runs (as the previous push was superseded, so the outcome is no longer relevant).

However, for the "main" branches (`master` and `4.0`), this workflow cancelling means that if multiple PRs are merged in succession, only the code coverage for the _last_ merge is recorded in Coveralls as the workflow runs on `master` for the previous merges will have been cancelled.

While in practice, it's not a biggie, it does make it more difficult to identify which commit/merge added or decreased code coverage.

With this in mind, I'm making a small change to the `concurrency` setting for the `test` workflow only to allow those to always finish when the workflow is run for the "main" branches.
@jrfnl jrfnl added this to the 3.11.2 milestone Nov 22, 2024
@jrfnl jrfnl merged commit 40c7a43 into master Nov 22, 2024
72 checks passed
@jrfnl jrfnl deleted the feature/ghactions-dont-cancel-in-progress-main-branches branch November 22, 2024 20:15
@jrfnl
Copy link
Member Author

jrfnl commented Nov 22, 2024

Hmm.. at first look, this doesn't seem to be working as advertised (as in: the next PR I merged, still cancelled the builds).

According to the documentation, this should be possible though and the github.ref_name should contain the short ref of the branch, so the conditions should be correct, but clearly something is still not right.

Will have to have another look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant