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
Replace wp-env
with install-wp-tests.sh
in CI
#1085
Comments
Adding one more point to this: |
Thanks @thelovekesh. I don't think that the benefits of maintaining a separate One thing that I've found to be extremely helpful for developers when working on features is being able to confidently run the same PHPUnit tests (an other tools) locally that will be run by CI. This is particularly true when writing new tests or modifying existing test. Making use of a solution like You're referencing a bash script, If we have a need to customize the configuration of the PHP Unit tests in I think @felixarntz expressed similar opinions in this PR. |
Thanks @joemcgill.
But we are only making changes to CI tests to test them more granularly and performantly. It should not affect any developer workflow since
Humm sorry for the confusion here, I have updated the comment. Here I was referring to one maintained in https://github.com/wp-cli/scaffold-command/blob/main/templates/install-wp-tests.sh but we can fine-tune this per our use case. I just mentioned it to give an idea about using core files from svn + local MySQL setup.
That's equally true for any tests setup since |
I understand the goal. The scenario that I want to avoid is one where we have made changes to the test configuration in our CI tools that no longer reflect what a developer would experience locally, making it either more difficult or less reliable to write, maintain, and/or run tests locally. I also understand that this is not the intent currently, but it is very easy to have these configurations diverge over time. For example, we can currently ensure that certain required plugins are installed and activated on the test environment by simply adding them to the .wp-env.json file. Configuring the test environment for folks running tests locally differently from how they are configured in CI can cause disruption that would be good to avoid. |
@thelovekesh As expressed in previous comments on the other PR, I agree with @joemcgill in that I have concerns about switching away from Taking a step back here: What I am missing is a concrete list of problems that
The only point in the issue description which I 100% agree with is that Both from a developer experience perspective and a maintenance perspective I am not convinced we should move away from |
Feature Description
While using
wp-env
is great for local development, we should think carefully about using it for CI testing. Tools likeinstall-wp-tests.sh
are built specifically for this purpose and offer several advantages:install-wp-tests.sh
sets up the WordPress environment and runs tests much faster thanwp-env
.plugins/
#1013 (comment) ). Using different tools can help us spot problems more easily among them.install-wp-tests.sh
lets us control the testing setup more precisely. This is important if we need to make adjustments for specific scenarios like enabling/disabling particular extensions, enabling coverage extensions, etc.install-wp-tests.sh
is designed from the ground up for WordPress testing. It does this single task exceptionally well.install-wp-tests.sh
, we can solve issues in our CI setup much more quickly. We can always suggest fixes upstream and they can improve our local development but upstream turnaround time should not block CI workflows.The text was updated successfully, but these errors were encountered: