Complete PHPUnit infrastructure for out-of-the-box local and CI testing, including initial tests#29
Conversation
…dencies are installed before testing.
JustinyAhin
left a comment
There was a problem hiding this comment.
@felixarntz I've tested this, and it looks good overall.
Just added a little comment about the documentation.
| Monorepo for the [WordPress Performance Group](https://make.wordpress.org/core/tag/performance/), primarily for the overall performance plugin, which is a collection of standalone performance modules. | ||
|
|
||
| ## Useful commands | ||
|
|
There was a problem hiding this comment.
Would it makes sense to mention we need to have Docker up and running before running the wp-env commands. And/or link to the handbook (https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/)
There was a problem hiding this comment.
+1 to that, for someone without Docker this npm run wp-env start and everything after fails.
There was a problem hiding this comment.
Great point, I added a note about both Node.js and Docker being required.
|
@felixarntz when I tried running Apparently my current npm version of For what its worth, I get a similar error (not warning) when I try to do npm install in the gutenberg repo: |
|
@felixarntz - this looks great! I left a few questions. I was able to run the tests locally without docker by setting |
|
@JustinyAhin @ThierryA @adamsilverstein Updated based on your feedback!
Yes, this is intended. The NPM commands (outlined in the |


This PR completes the PHPUnit infrastructure so that the repository allows to easily run PHPUnit tests locally in a centralized environment. It also includes a GitHub action to ensure PHPUnit tests run as CI.
The implementation here is pretty much copied over from Gutenberg, reusing the
@wordpress/envpackage, which allows us to keep the code here simple.In detail, this PR includes:
package.jsonfile to include@wordpress/envdependency and PHP linting/testing scriptsphp-test.ymlto run the above tests automatically on push and PR mergeload.php(which is all PHP code that exists so far)Please see the
README.mdadditions for which commands to use locally to run PHP linting and testing.Fixes #28