pento / testpress

Tool for helping you get a WordPress Core test environment up and running.
GNU General Public License v2.0
68 stars 2 forks source link

Move script-type services to a secondary docker-compose file #99

Closed pento closed 5 years ago

pento commented 5 years ago

By moving PHPUnit and WP-CLI to a secondary file, this ensures they aren't unnecessarily run during the initial docker-compose up call.

Fixes #88.

Testing

A simple test to confirm that PHPUnit isn't in the default docker config is to run:

cd ~/Library/Application Support/testpress/tools
docker-compose run --rm phpunit phpunit

You should see ERROR: No such service: phpunit.

Running this command will actually run PHPUnit:

docker-compose -f docker-compose.yml -f docker-compose.scripts.yml run --rm phpunit phpunit
pento commented 5 years ago

This PR also includes encoding: 'utf8' options on all of the Docker spawn() calls that were missing them. These should've been added in #85.