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

Avoid running CI jobs on both push and pull_request events. #704

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Mar 2, 2021

When pushing changes to a branch, CI would run double the jobs (one set of CI jobs for the branch push event, and another set of jobs for the pull_request event).

This change tweaks the CI hooks to only run for pull requests targeting master and branches named master (also allow v* style release branches, just in case we wanted them in the future).

Compare #703's (90 CI jobs) CI runs vs #694's (41 CI jobs).

When pushing changes to a branch, CI would run **double** the jobs (one
set of CI jobs for the branch push event, and another set of jobs for
the `pull_request` event).

This change tweaks the CI hooks to only run for pull requests
**targeting** `master` and branches named `master` (also allow `v*`
style release branches, just in case we wanted them in the future).
@thoov
Copy link
Collaborator

thoov commented Mar 2, 2021

👍

@thoov thoov merged commit c095674 into master Mar 2, 2021
@thoov thoov deleted the avoid-double-running branch March 2, 2021 22:32
@ef4
Copy link
Contributor

ef4 commented Mar 3, 2021

FWIW, this was intentional. They're supposed to be testing slightly different things. But I agree it's overkill.

@rwjblue
Copy link
Collaborator Author

rwjblue commented Mar 3, 2021

Hmmm. They run the same matrix as far as I could tell, how do they test different things? What was I missing?

Happy to revert, and also change to primarily pushing to my own fork to avoid the double running.

@ef4
Copy link
Contributor

ef4 commented Mar 3, 2021

I was under the impression that git's default PR checking tests against a new commit that merges the PR with the target branch, whereas the branch checking tests exactly the PR's head commit. But I guess I was just assuming that and didn't see any docs.

@ef4
Copy link
Contributor

ef4 commented Mar 3, 2021

Either way, I'm still fine with this change. I pushed a copy of this repo into a branch on a private repo and the single run of actions that resulted ate my entire free quota. 😅

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

Successfully merging this pull request may close these issues.

3 participants