Consistent phpunit runners for local and CI#493
Conversation
783b8d0 to
15e03a5
Compare
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
During CI we require in versions as needed Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
051ece5 to
7ec0085
Compare
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
|
I personally have less than zero interest in using wp-env as the standard environment: a dependency on node in order to run bash scripts in order to run PHP. If this is the easiest way to switch WP versions quickly in CI, especially if it can cache the different versions, then I'm not going to stand in the way, but I would very much prefer to avoid gratuitous Node dependencies as far as the officially sanctioned dev workflow goes, and would rather see something like DDEV be it instead. |
Yeah, this setup (and the updated documentation) allows us to consistently test the plugin against any version of PHP and WP core. Previously the setup used locally ( I absolutely don't love |
|
@kasparsd Beyond resolving conflicts, are you waiting for further review? |
|
@cdils if we agree on the concept (same tooling locally and in CI for consistency) then I believe this is ready for merge. I'll resolve the merge conflicts now. |
…fresh Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
|
@cdils the conflicts have been resolved ✅ |
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Fixes #479, fixes #383.
A follow-up to #382.
Development workflow consistency:
wp-envso both paths use the same environment bootstrapping and runtime logic.wp-env-based toolchain instead of relying on a separate runner-level PHP setup.Local setup and onboarding:
.nvmrcand upgrades@wordpress/env, reducing local setup drift and keeping machines closer to CI.wp-envthe default local workflow, covering start/log/stop commands, PHPUnit usage, coverage, and version overrides..wp-env.override.jsonandWP_ENV_PHP_VERSION/WP_ENV_COREenv vars, making local environment customization straightforward without changing repo defaults.Local PHPUnit execution:
wp-envtests container, removing the old split between custom local setup and CI-only test installation.tests:clipath and install flow for test dependencies, so local test runs are easier to reason about and reuse.WordPress and PHP version matrix support:
wp-envfrom override files or environment variables.CI parity with local testing:
wp-env-based approach to coverage runs, improving parity between local verification and CI.CI timing
Previously the
phpunitsetup in CI didn't usewp-envleading to two different ways of running the same tests. Switching towp-envensures that we can run the tests with any combination of PHP and WP core both locally and during CI.Running the
phpunittest matrix in CI before the change took 1min 42s:while now it takes 3min 16s (or 2min 30s in recent runs):
which is a minor increase but offers consistency and predictability.