Conversation
|
This is cool, thanks for working on it! The existing docker container has fully working WordPress installation. I don’t know what the good practices about Docker are, but in theory we could setup everything inside one container. Question is if we want to keep them separate? Another question is if we want to update Travis configuration to use newly added JS run scripts wrappers? The benefit of doing so would be the feedback from Travis if this setup works properly as project progresses. |
|
Yeah, that's great I always struggle running these tests. I have the same question as @gziolo Can't we use the default docker setup to run the unit tests there or do we want them to be isolated? |
|
I'm not particularly familiar with configuring Docker, so I found that using a pre-existing container was the easiest way to get it setup. I think the PHPUnit behaviour could be merged into the WordPress container with a Dockerfile that installs all the necessary bits. I'll experiment a bit, and see how it works. |
bb1c132 to
cef1b09
Compare
|
Okay, this is looking pretty good, I think. @gziolo, @youknowriad: What do you think? |
| - stage: test | ||
| php: 7.1 | ||
| env: WP_VERSION=latest | ||
| env: WP_VERSION=latest DOCKER=true |
There was a problem hiding this comment.
So unit tests and linting are now consolidated, nice 👍
|
Travis is happy about the changes introduced. I will give it a try today. Code wise I don't have much to comment, as I don't have enough Docker experience :) |
|
I pretty much learned Docker... today. So, you can catch up pretty quick. 😉 |
|
@WordPress/gutenberg-core: I would like your opinion on 2460ba1. The other npm scripts added in this PR are new, so I'm okay with them requiring Docker. Changing the It seems to me like Docker is a pretty good option for a workflow that isn't awful to setup, but it does mean becoming more opinionated about the development environment. Working from a custom WordPress install will be trickier, for example. |
package.json
Outdated
There was a problem hiding this comment.
cc @aduth as I think you added this script, which now requires docker
Also, share the one database container.
e384f3f to
6317ed2
Compare
|
Rebased on master. |
|
Nice, now I can test on master. I was going to propose merging it by Monday anyway 😃 |
|
Testing on master is the only place you can get accurate results. |
While it's easy to set up the local testing environment for JS, it's fiddly and annoying to set up a similar environment for PHP.
This PR adds a PHPUnit docker container, so that tests can more easily be run. It also includes
npm runshortcuts for running the tests.