Simplify multisite acceptance tests setup
[MAILPOET-2302]
This commit is contained in:
@ -154,6 +154,9 @@ jobs:
|
|||||||
parameters:
|
parameters:
|
||||||
index:
|
index:
|
||||||
type: integer
|
type: integer
|
||||||
|
multisite:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: /home/circleci/mailpoet
|
at: /home/circleci/mailpoet
|
||||||
@ -165,7 +168,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
mkdir -m 777 -p tests/_output/exceptions
|
mkdir -m 777 -p tests/_output/exceptions
|
||||||
cd tests/docker
|
cd tests/docker
|
||||||
docker-compose run -e SKIP_DEPS=1 codeception -g acceptance_group_<< parameters.index >> --steps --debug -vvv --html --xml
|
docker-compose run -e SKIP_DEPS=1 -e MULTISITE=<< parameters.multisite >> codeception -g acceptance_group_<< parameters.index >> --steps --debug -vvv --html --xml
|
||||||
- run:
|
- run:
|
||||||
name: Check exceptions
|
name: Check exceptions
|
||||||
command: |
|
command: |
|
||||||
@ -177,35 +180,6 @@ jobs:
|
|||||||
path: tests/_output
|
path: tests/_output
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: tests/_output
|
path: tests/_output
|
||||||
acceptance_tests_multisite:
|
|
||||||
working_directory: /home/circleci/mailpoet
|
|
||||||
machine: true
|
|
||||||
parameters:
|
|
||||||
index:
|
|
||||||
type: integer
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /home/circleci/mailpoet
|
|
||||||
- run:
|
|
||||||
name: "Set up virtual host"
|
|
||||||
command: echo 127.0.0.1 mailpoet.loc | sudo tee -a /etc/hosts
|
|
||||||
- run:
|
|
||||||
name: Run acceptance tests
|
|
||||||
command: |
|
|
||||||
mkdir -m 777 -p tests/_output/exceptions
|
|
||||||
cd tests/docker
|
|
||||||
docker-compose run -e SKIP_DEPS=1 -e MULTISITE=1 codeception -g acceptance_group_<< parameters.index >> --steps --debug -vvv --html --xml
|
|
||||||
- run:
|
|
||||||
name: Check exceptions
|
|
||||||
command: |
|
|
||||||
if [ "$(ls tests/_output/exceptions/*.html)" ]; then
|
|
||||||
echo "There were some exceptions during the tests run"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- store_artifacts:
|
|
||||||
path: tests/_output
|
|
||||||
- store_test_results:
|
|
||||||
path: tests/_output
|
|
||||||
php7_unit:
|
php7_unit:
|
||||||
resource_class: small
|
resource_class: small
|
||||||
working_directory: /home/circleci/mailpoet
|
working_directory: /home/circleci/mailpoet
|
||||||
@ -394,36 +368,46 @@ workflows:
|
|||||||
- php7_integration:
|
- php7_integration:
|
||||||
requires:
|
requires:
|
||||||
- php7_unit
|
- php7_unit
|
||||||
- acceptance_tests_multisite:
|
- acceptance_tests:
|
||||||
index: 1
|
index: 1
|
||||||
|
multisite: 1
|
||||||
|
name: acceptance_tests_multisite_1
|
||||||
requires:
|
requires:
|
||||||
- php5_unit
|
- php5_unit
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
- acceptance_tests_multisite:
|
- acceptance_tests:
|
||||||
index: 2
|
index: 2
|
||||||
|
multisite: 1
|
||||||
|
name: acceptance_tests_multisite_2
|
||||||
requires:
|
requires:
|
||||||
- php5_unit
|
- php5_unit
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
- acceptance_tests_multisite:
|
- acceptance_tests:
|
||||||
index: 3
|
index: 3
|
||||||
|
multisite: 1
|
||||||
|
name: acceptance_tests_multisite_3
|
||||||
requires:
|
requires:
|
||||||
- php5_unit
|
- php5_unit
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
- acceptance_tests_multisite:
|
- acceptance_tests:
|
||||||
index: 4
|
index: 4
|
||||||
|
multisite: 1
|
||||||
|
name: acceptance_tests_multisite_4
|
||||||
requires:
|
requires:
|
||||||
- php5_unit
|
- php5_unit
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
- acceptance_tests_multisite:
|
- acceptance_tests:
|
||||||
index: 5
|
index: 5
|
||||||
|
multisite: 1
|
||||||
|
name: acceptance_tests_multisite_5
|
||||||
requires:
|
requires:
|
||||||
- php5_unit
|
- php5_unit
|
||||||
filters:
|
filters:
|
||||||
|
@ -36,7 +36,7 @@ mysqladmin --host=mysql --user=root --password=wordpress create wordpress --forc
|
|||||||
|
|
||||||
# install WordPress
|
# install WordPress
|
||||||
WP_CORE_INSTALL_PARAMS="--url=test.local --title=tests --admin_user=admin --admin_email=test@test.com --admin_password=password --skip-email"
|
WP_CORE_INSTALL_PARAMS="--url=test.local --title=tests --admin_user=admin --admin_email=test@test.com --admin_password=password --skip-email"
|
||||||
if [ -z "${MULTISITE}" ]; then
|
if [[ -z "$MULTISITE" || "$MULTISITE" -eq "0" ]]; then
|
||||||
echo 'Installing WordPress (single site mode)'
|
echo 'Installing WordPress (single site mode)'
|
||||||
wp core install $WP_CORE_INSTALL_PARAMS
|
wp core install $WP_CORE_INSTALL_PARAMS
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user