-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreadme.dev.txt
37 lines (26 loc) · 1.98 KB
/
readme.dev.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Docker
To initiate the project start with the command "docker-compose up -d".
This will setup the images and install WooCommerce and Storefront as well as changing some settings. This might take a minute or two the first time.
This will let you access and change other plugins as needed for potential compatibility debugging.
After the initial setup you can close the project with "docker-compose stop" and start it with "docker-compose start". The WordPress installation will be available under your localhost.
Install PHPUnit with Docker
First you need to run the command "docker-compose -f docker-compose.yml -f docker-compose.phpunit.yml up -d"
After the images are setup you need to install the WP test environment. Run this command "docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit ./tests/bin/install-wp-tests.sh wordpress_test root wordpress mysql_phpunit latest true"
Run PHPUnit with Docker
When this is done, you can run the PHPUnit tests with the following command "docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit phpunit -c phpunit-docker.xml"
This uses a separate xml file for PHPUnit that has the environment variable for docker set to true. This is to be able to include WooCommerce in the testing since this is a requirement of our Plugin.
Commands
Install the containers:
"docker-compose up -d"
Start the containers
"docker-compose start"
Stop the containers
"docker-compose stop"
Install PHPUnit containers:
"docker-compose -f docker-compose.yml -f docker-compose.phpunit.yml up -d"
Install WP Test suite
"docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit ./tests/bin/install-wp-tests.sh wordpress_test root wordpress mysql_phpunit latest true"
Install WooCommerce for the test suite
"docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit ./tests/bin/download-woocommerce.sh"
Run PHPUnit Tests with docker
"docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit phpunit -c phpunit-docker.xml"