-
Notifications
You must be signed in to change notification settings - Fork 53
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
Improve behavior for single-file plugins #319
Improve behavior for single-file plugins #319
Conversation
In an attempt to test the The issue might be related to the behaviour of
|
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.
@mukeshpanchal27 Good catch, and I think you're on the right track with the approach. The solution could be simplified though, some of the changes aren't needed.
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.
Nice and concise!
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.
Thanks @mukeshpanchal27, looks great!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #319 +/- ##
==========================================
- Coverage 39.49% 36.57% -2.92%
==========================================
Files 43 43
Lines 2028 2034 +6
==========================================
- Hits 801 744 -57
- Misses 1227 1290 +63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@swissspidy I believe the |
@felixarntz The failed Behat check was just a flake, can be simply restarted. Or do you mean the |
@swissspidy What's the threshold for On that note @mukeshpanchal27, could you maybe add 2 unit tests for the extra condition in |
Not sure what the default threshold is, I suppose any negative change causes a failed check. Note that right now coverage right now is only collected through Behat tests, not the unit tests. That needs to be added separately. Happy to whip up a quick PR. |
@swissspidy Oh okay. In that case it would be great if you could open an extra PR for this, or feel free to use this one. |
Working on a new one over here: #321 |
@felixarntz I have added two tests, but Codecov is indicating an error. Could we address the coverage issue once this pull request is merged? |
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.
Thank you @mukeshpanchal27 for adding the two tests, those looks great.
Regarding the continuing workflow error, I think we'll just have to wait for #321 to be merged, then we can refresh this PR with trunk
and then it should hopefully pass.
Why not just merge this now? 🤔 |
@swissspidy I think we should avoid failing tests. There's no rush on getting this particular PR shipped, so I don't think we have to merge this before addressing the failures. |
To be fair it's not a failed test, but a failed status check because there is more code being introduced and we don't have code coverage set up. |
Fixes #307
This PR improve the behaviour for the single file plugins. You can test single file plugin such as
Hello Dolly
.CLI command:
npm run wp-env run cli -- wp plugin check hello.php