-
Notifications
You must be signed in to change notification settings - Fork 138
Remove branch restrictions so workflows can run on PRs for any branch #1044
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
felixarntz
left a comment
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.
@westonruter Overall makes sense. However, do we need all of those to run on "random" PRs? Some of those checks are most relevant on PRs against trunk and feature branches - I'm not even sure how common of a use-case it is to have PRs that aren't against those kinds of branches.
Anyways, I'd say linting and unit testing probably makes sense to have no restriction on. But the plugin testing and PR validation, not sure. Sure, we could run all, but there's also a time and resource cost to this, so I'd say let's limit it to what's truly useful.
|
@felixarntz The use case is very common for me. To prevent getting blocked and to avoid overly-large pull requests, I open sub-PRs. In this case, it is very useful to have all checks run as if the PR was opened against What other random PRs do you have in mind? |
Makes sense. In an ideal world, such sub PRs wouldn't be necessary, but I agree they're sometimes better than getting blocked. When you say "sub-PR", this still means the PR will eventually be reviewed against the "real" base branch though correct? As far as I understand, you only create those PRs to be able to continue working while the PRs that have to be merged first are still waiting for review/approvals. Is that correct? Something I'd like to avoid for instance is that those "sub-PRs" would be the foundation for actual review processes even before the previous PR gets merged. That could get messy very easily. For review, it's always better to have the previous work merged so that the actual changes are obvious to review.
Nothing really, with "random PRs" I just meant any PRs that are not against |
That is correct. |
|
In terms of the workflows, I think some workflows are better suited for once the PR is actually ready for review (e.g. the label/milestone check, I don't see its value on a PR that's effectively not ready for review anyway). As in:
LMKWYT. |
|
@felixarntz OK, I've reverted the changes to the TBH, I hadn't before looked deeply at performance/plugin-tests/tests/test-standalone.php Lines 13 to 15 in 06d6ffe
It seems there would be a much simpler way to go about testing for a fatal, and that would be to not use PHPUnit at all but rather to:
In the future, it would be better to use Playwright to do some actual E2E testing rather than a simple As it stands right now, the existing standalone tests appear to be broken. As seen in this job: Nevertheless, the jobs are passing. So the |
97b4015 to
e164f9c
Compare
|
Thanks, @westonruter, for the PR. I had it on my list to open a PR, but you beat me to it. The standalone tests break after the changes made in #1011. We should change the condition here https://github.com/WordPress/performance/blob/trunk/bin/plugin/commands/build-plugins.js#L29 so that it with skip the module part if we don't have module lists. I will open a PR soon to address this issue. The tests should not work for modules but should work for plugins only. Both scripts should be updated accordingly. |
@westonruter I think that test is just a dummy so that we have at least 1 test there. It's not really trying to detect fatal errors or anything. |
@swissspidy Right, I didn't mean that somehow
It seems PHPUnit isn't the right tool for the job here if we're just wanting to check for a plugin fatal error. |
Filed: #1051 |
Summary
This will ensure that checks run on sub-PRs for feature branches.
Fixes #998
Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.