xvfb needs to be started in before_script
This commit is contained in:
parent
5a9cb3e862
commit
862c43c553
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue