xvfb needs to be started in before_script

This commit is contained in:
Gerhard 2019-08-05 14:43:54 +02:00
parent 5a9cb3e862
commit 862c43c553
2 changed files with 4 additions and 4 deletions

View File

@ -66,6 +66,9 @@ before_script:
bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=5.7.*|7.5.*"
fi
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3 # give xvfb some time to start
script:
- bash tests/bin/phpunit.sh

View File

@ -3,11 +3,8 @@ if [[ ${RUN_E2E} == 1 ]]; then
WP_SITE_URL="http://localhost:8080"
# Start xvfb to run the tests
# Set base url to that of e2e test suite.
export BASE_URL="$WP_SITE_URL"
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
# Run the tests
npm test