-
Notifications
You must be signed in to change notification settings - Fork 97
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
Merge to master before running tests #217
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a PR is branched from a point before current master, the CI tests are run ignoring any intermediary commits.
Well, isn't that expected behavior? Is there a particular reason to work-around that only for doc-base?
I would argue is not expected behavior that CI tests test a version of code that will never exist. Taking a branch from before the tip of master is no different of taking five branchs of same tip of master, and then merging then in any order. The first merge will not show this problem, but for the other fours are now effectively branched not from from the tip of master, but from a previous version. And CI will ignore any of this, will test the code excluding any changes to master, and then, when merged, the code merged is not the code tested.
The doc-base is checked out from a branch, all other repos are already checked from master. |
I was not particularly referring to doc-*, but rather to "all" GH repos using the checkout action (not only those of the php organization). It seems to me that it is relatively rare that issues arise due to not testing against the HEAD (+ the PR commits), and this can be resolved with a rebase. That said, I'm not against your suggested change. |
That is something I asked on #205 (comment) , and got no answers.
It's rare, yet it happened, in doc-base no less. Any CI that uses |
Checking out the |
I think I confirmed it. Besides the checkout being made from Not because of a merge conflict, but because of an Next I will try some fixes for |
…o detached checkout
Sorry for the noise. I think this may be a hard problem to solve, as Also, the problem is really about a cached state. Even after changes are made in Meanwhile, I changed the PR to a test that will intentionally fail, if the merge commit targets a hash that is not the head of master. |
An old teste generated: Running test same test after merge 218: After a commit make insignificant chantes on PR: So, only to repeat. GitHub And GitHub This PR, as it is now, only refuses to run CI when the commit merge target is outdated. |
When a PR is branched from a point before current master, the CI tests are run ignoring any intermediary commits. In other words, tests are running considering one version that will never exist in practice.
To avoid this, run an local
git merge
from the branched checkout. This is a no-op if there is no commits to be merged.