Make WordPress Core

Changeset 40282


Ignore:
Timestamp:
03/11/2017 05:37:36 PM (8 years ago)
Author:
ocean90
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.
  • In addition, brings the Slack notification settings up to date and allows Travis CI to cache the node_modules directory.

Merge of [40255], [40257-40259], [40269], and [40271] to the 4.2 branch.

See #35105, #40100, #30755, #36291, #36490.

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/.travis.yml

    r40230 r40282  
    11sudo: false
    22language: php
     3cache:
     4  directories:
     5    - node_modules
    36matrix:
    47  include:
     
    3639before_script:
    3740- |
    38   stable='^[0-9\.]+$';
     41  # Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
     42  stable='^[0-9\.]+$'
    3943  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    40       phpenv config-rm xdebug.ini
     44    phpenv config-rm xdebug.ini
    4145  fi
    42 - npm install -g npm
     46- |
     47  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     48  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     49    composer config --list --global
     50    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
     51  fi
     52- |
     53  # Install the specified version of PHPUnit depending on the PHP version:
     54  if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
     55    case "$TRAVIS_PHP_VERSION" in
     56      7.1|7.0|hhvm|nightly)
     57        echo "Using PHPUnit 5.7"
     58        composer global require "phpunit/phpunit=5.7.*"
     59        ;;
     60      5.6|5.5|5.4|5.3)
     61        echo "Using PHPUnit 4.8"
     62        composer global require "phpunit/phpunit=4.8.*"
     63        ;;
     64      5.2)
     65        # Do nothing, use default PHPUnit 3.6.x
     66        echo "Using default PHPUnit, hopefully 3.6"
     67        ;;
     68      *)
     69        echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     70        exit 1
     71        ;;
     72    esac
     73  fi
     74- npm --version
     75- node --version
     76- nvm install 4.7.2
    4377- npm install -g grunt-cli
    4478- npm install
     79- npm prune
    4580- php --version
     81- |
     82  # Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
     83  if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
     84    php -m
     85  fi
     86- npm --version
     87- node --version
     88- which phpunit
     89- phpunit --version
     90- curl --version
     91- grunt --version
     92- git --version
     93- svn --version
    4694script: grunt $WP_TRAVISCI
    4795notifications:
    4896  slack:
    49     secure: "ln2sC0yUOMzGGJ9PR56cxafCO2YSBQtFs0JuoSjvmXN0+jCGbQL781z2osEJ24BEl4o3zMLfiFPgieM7D+VuRObU6TiVFLmbebgoSyW/1Gs+jPNxBXPKOSLE3/4CV8ifyhm5XZr2xT6z8OWC6StHl2nPis4wZ91UHbj6FhlMyFM="
     97    rooms:
     98      secure: WuMCpfgrm0GIdPbYzsGOsakZ5x7QIbEBwD+CPHVXGKbL3ZbqQ+BVcDRnMiwzxjgf1vzg2de0taXCSMGKBxsWce23NZkOnmwPdIB8XOnwDV7T7zylgYD5S7p3gI6gV0l8Y3/gROdXFZap6viC1qRr4E79ow53RKk7E3WyOo7TWqo=
     99    on_start: never
     100    on_failure: always
     101    on_success: change
Note: See TracChangeset for help on using the changeset viewer.