WordPress.org

Make WordPress Core

Changeset 40276


Ignore:
Timestamp:
03/11/2017 02:26:19 AM (4 years ago)
Author:
johnbillion
Message:

Build/Test tools: Update .travis.yml to include latest improvements from trunk.

  • Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
  • On Travis CI install and use the node version which is specified in package.json.
  • Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
  • Get Travis builds working on HHVM again.

Merges [40255], [40257], [40258], [40259], [40269], and [40271] to the 4.4 branch.

See #35105, #40100

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/.travis.yml

    r40228 r40276  
    4646before_script:
    4747- |
    48   stable='^[0-9\.]+$';
     48  # Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
     49  stable='^[0-9\.]+$'
    4950  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    50       phpenv config-rm xdebug.ini
     51    phpenv config-rm xdebug.ini
    5152  fi
    52 - npm install -g npm
     53- |
     54  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     55  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     56    composer config --list --global
     57    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
     58  fi
     59- |
     60  # Install the specified version of PHPUnit depending on the PHP version:
     61  if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
     62    case "$TRAVIS_PHP_VERSION" in
     63      7.1|7.0|hhvm|nightly)
     64        echo "Using PHPUnit 5.7"
     65        composer global require "phpunit/phpunit=5.7.*"
     66        ;;
     67      5.6|5.5|5.4|5.3)
     68        echo "Using PHPUnit 4.8"
     69        composer global require "phpunit/phpunit=4.8.*"
     70        ;;
     71      5.2)
     72        # Do nothing, use default PHPUnit 3.6.x
     73        echo "Using default PHPUnit, hopefully 3.6"
     74        ;;
     75      *)
     76        echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     77        exit 1
     78        ;;
     79    esac
     80  fi
     81- npm --version
     82- node --version
     83- nvm install 4.7.2
    5384- npm install -g grunt-cli
    5485- npm install
    5586- php --version
     87- |
     88  # Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
     89  if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
     90    php -m
     91  fi
    5692- npm --version
    5793- node --version
     94- which phpunit
     95- phpunit --version
     96- curl --version
     97- grunt --version
     98- git --version
     99- svn --version
    58100script: grunt $WP_TRAVISCI
    59101notifications:
Note: See TracChangeset for help on using the changeset viewer.