-
Notifications
You must be signed in to change notification settings - Fork 118
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
[Feature] Run codeception tests in a dockerized environment #199
Comments
Yes of course! |
Shall we discuss about the requirement then ? |
I have no thoughts about it as I don't use docker at all and I have no bias for tests. As you see also the CI of the boilerplate doesn't run the tests https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/blob/master/.github/workflows/integrate.yml so it is complete from this side. |
Been using wp-env, which is dockerized and a pretty sweet package. |
I think that isn't detecting the codeception settings. |
yeah i see... looks like some env variables were switched during the ci workflow WordPress-Plugin-Boilerplate-Powered/.github/workflows/integrate.yml Lines 215 to 216 in ccd199f
and the original one doesn't fit the wp-env ports / domain etc. |
If you run codecept with |
@erikyo i guess if you run the bootstrap command the yml is created in root instead of plugin folder. Also on the run command. This is why no tests are found. |
As I can see on https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#customizing-the-wp-tests-config-php-file there is the file with the parameters to use the docker env to access the DB for tests so probably needs to be updated inside the plugin folder to fix the issue. |
@Mte90 the envs are not the Problem. the missing mysql pdo inside the container the is currently my issue. May i need to swicht back to selfmade docker setup instead of @wordpress/env |
Did you opened a ticket to the wp-env project for that? |
Is your feature request related to a problem? Please describe.
It would be nice if we could test our plugin right away without having to rely on a preinstalled wordpress site.
Describe the solution you'd like
I'd like to use the official wordpress docker image to run the tests with a single command that would that care of building the container, launch selenium, and run the tests. It would also allow a better integration in our CI pipelines.
I'm almost ready with setting up this solution in one of my projects, and would be happy to submit a PR with a generalized solution, if you think that would be an improvement to WPBP.
The text was updated successfully, but these errors were encountered: