WordPress.org

Make WordPress Core

Ticket #40100: 40100.diff

File 40100.diff, 2.0 KB (added by johnbillion, 4 years ago)
  • .travis.yml

     
    99    - WP_TRAVISCI=travis:phpunit
    1010matrix:
    1111  include:
    12   - php: 7
     12  - php: 7.0
    1313    env: WP_TRAVISCI=travis:js
    1414  - php: 5.2
    1515  - php: 5.3
     
    5252  fi
    5353before_script:
    5454- |
     55  # Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
    5556  stable='^[0-9\.]+$'
    5657  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    5758    phpenv config-rm xdebug.ini
    5859  fi
    59 - export PATH="$HOME/.composer/vendor/bin:$PATH"
    6060- |
    61   if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
    62     composer global require "phpunit/phpunit=5.7.*"
    63   elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
    64     composer global require "phpunit/phpunit=4.8.*"
     61  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     62  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     63    composer config --list --global
     64    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
     65    echo $PATH
    6566  fi
     67- |
     68  # Install the specified version of PHPUnit depending on the PHP version:
     69  case "$TRAVIS_PHP_VERSION" in
     70    7.1|7.0|hhvm|nightly)
     71      echo "Using PHPUnit 5.7"
     72      composer global require "phpunit/phpunit=5.7.*"
     73      ;;
     74    5.6|5.5|5.4|5.3)
     75      echo "Using PHPUnit 4.8"
     76      composer global require "phpunit/phpunit=4.8.*"
     77      ;;
     78    5.2)
     79      # Do nothing, use default PHPUnit 3.6.x
     80      echo "Using default PHPUnit, hopefully 3.6"
     81      ;;
     82    *)
     83      echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     84      exit 1
     85      ;;
     86  esac
    6687- npm --version
    6788- node --version
    6889- nvm install 6.9.1
     
    7394- phpenv versions
    7495- php --version
    7596- |
     97  # Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
    7698  if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
    7799    php -m
    78100  fi
    79101- npm --version
    80102- node --version
     103- which phpunit
    81104- phpunit --version
    82105- curl --version
    83106- grunt --version