From 5abc1d942788340d86583441aaa3c5d38d05e875 Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Mon, 3 Feb 2020 14:50:39 +0100 Subject: [PATCH] composer install can only run after npm install as it uses npm package to fix the textdomain. --- .travis.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e209ae6a0c1..8decdf4a7cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,26 @@ matrix: env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1 - name: "E2E tests" php: 7.4 - script: + before_script: + - export PATH="$HOME/.composer/vendor/bin:$PATH" + - | + # Remove Xdebug for a huge performance increase: + if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then + phpenv config-rm xdebug.ini + else + echo "xdebug.ini does not exist" + fi - npm install + - composer install --no-dev + - | + # Install WP Test suite, install PHPUnit globally: + if [[ ! -z "$WP_VERSION" ]]; then + bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION + composer global require "phpunit/phpunit=5.7.*|7.5.*" + fi + - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" + + script: - npm run build - docker-compose up --build -d - bash tests/bin/run-e2e-CI.sh