WIP: Lay out some basic concepts around the Docker Container#1
WIP: Lay out some basic concepts around the Docker Container#1stevegrunwell wants to merge 2 commits intomasterfrom
Conversation
|
|
||
| ```yaml | ||
| env: | ||
| - WP_PLUGINS=jetpack@latest,woocommerce@3.7 |
There was a problem hiding this comment.
This makes sense. It should also allow installing via zip. For example caldera-forms@https://github.com/CalderaWP/Caldera-Forms/releases/download/1.8.3-beta.1/1.8.3-beta.1.zip or caldera-forms@gh-1.8.3-beta.1.
wp-cli can install plugin by WordPress.org slug or ZIP file https://developer.wordpress.org/cli/commands/plugin/install/
|
@stevegrunwell Thanks for getting this started. I'm going to put a lot of thaughts here so they are public and beacuse it helps me think. I will take a pass at expanding your draft once I have thaught. I think we should have two use cases in mind for docker containers we should consider:
That way not only is it easy to run tests in my local docker-compose, it's the same environment as CI will run in. I think there are four buckets of tests we should focus on:
I think that we have everything we need for this, in scattered verry messy peices that we can package in containers. Which is great. PHP unit tests with phpunit Examples:
WordPress test suite tests with phpunit https://developer.wordpress.org/cli/commands/scaffold/plugin-tests/ Those scripts cut and paste stuff from core. Can we extend the docker image used in core for testing to include copying those files as well as installing other depenenencies. That feels like a good solution? Examples: JavaScript tests with Jest via wordpress-scripts This one is fairly simple as well, beacuse it does not require WordPress or MySQL. Basically we need end to end tests/ browser automation tests via wordpress-scripts https://github.com/Shelob9/testing-react-wordpress/tree/master/e2e In core, they have a directory with all the useful tools: https://github.com/WordPress/wordpress-develop/tree/master/tests/e2e I think a good strategy here is to extend core's docker image that runs these to unclude copying these tests from wordpress-develop to the test environment and installing depencies and setting up MySQL and WordPress. |
No description provided.