From 5d650519851b9ddc3b9156c3fbab4028e0fdbc3d Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 10 Mar 2017 23:56:07 +0000 Subject: [PATCH] Build/Test tools: Don't install PHPUnit on the `travis:js` builds. Saves a couple of minutes of build time. See #40100 git-svn-id: https://develop.svn.wordpress.org/trunk@40271 602fd350-edb4-49c9-b593-d223f7449a82 --- .travis.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 892d1757c2..8196d391a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,24 +65,26 @@ before_script: fi - | # Install the specified version of PHPUnit depending on the PHP version: - case "$TRAVIS_PHP_VERSION" in - 7.1|7.0|hhvm|nightly) - echo "Using PHPUnit 5.7" - composer global require "phpunit/phpunit=5.7.*" - ;; - 5.6|5.5|5.4|5.3) - echo "Using PHPUnit 4.8" - composer global require "phpunit/phpunit=4.8.*" - ;; - 5.2) - # Do nothing, use default PHPUnit 3.6.x - echo "Using default PHPUnit, hopefully 3.6" - ;; - *) - echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" - exit 1 - ;; - esac + if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then + case "$TRAVIS_PHP_VERSION" in + 7.1|7.0|hhvm|nightly) + echo "Using PHPUnit 5.7" + composer global require "phpunit/phpunit=5.7.*" + ;; + 5.6|5.5|5.4|5.3) + echo "Using PHPUnit 4.8" + composer global require "phpunit/phpunit=4.8.*" + ;; + 5.2) + # Do nothing, use default PHPUnit 3.6.x + echo "Using default PHPUnit, hopefully 3.6" + ;; + *) + echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" + exit 1 + ;; + esac + fi - npm --version - node --version - nvm install 6.9.1