Make WordPress Core

Changeset 40286


Ignore:
Timestamp:
03/13/2017 10:34:03 PM (8 years ago)
Author:
ocean90
Message:

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

  • On Travis CI install and use node version 0.10.48 to ensure correct node-sass builds.
  • Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
  • 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.1 branch.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/.travis.yml

    r40231 r40286  
    11# Travis CI Configuration File
    2 
    3 # Tell Travis CI we're using PHP
     2sudo: false
    43language: php
     4cache:
     5  directories:
     6    - node_modules
    57
    68# Build matrix options
     
    4042# Before script, failures in this section will result in build status 'failed'
    4143before_script:
    42   - |
    43     stable='^[0-9\.]+$';
    44     if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    45         phpenv config-rm xdebug.ini
    46     fi
    47   - npm install -g grunt-cli
    48   - npm install
    49   - php --version
    50 
    51 # Script, failures in this section will result in build status 'failed'
     44- |
     45  # Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
     46  stable='^[0-9\.]+$'
     47  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
     48    phpenv config-rm xdebug.ini
     49  fi
     50- |
     51  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     52  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     53    composer config --list --global
     54    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
     55  fi
     56- |
     57  # Install the specified version of PHPUnit depending on the PHP version:
     58  if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
     59    case "$TRAVIS_PHP_VERSION" in
     60      7.1|7.0|hhvm|nightly)
     61        echo "Using PHPUnit 5.7"
     62        composer global require "phpunit/phpunit=5.7.*"
     63        ;;
     64      5.6|5.5|5.4|5.3)
     65        echo "Using PHPUnit 4.8"
     66        composer global require "phpunit/phpunit=4.8.*"
     67        ;;
     68      5.2)
     69        # Do nothing, use default PHPUnit 3.6.x
     70        echo "Using default PHPUnit, hopefully 3.6"
     71        ;;
     72      *)
     73        echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     74        exit 1
     75        ;;
     76    esac
     77  fi
     78- npm --version
     79- node --version
     80- nvm install 0.10.48
     81- npm install -g grunt-cli
     82- npm install
     83- npm prune
     84- php --version
     85- |
     86  # Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
     87  if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
     88    php -m
     89  fi
     90- npm --version
     91- node --version
     92- which phpunit
     93- phpunit --version
     94- curl --version
     95- grunt --version
     96- git --version
     97- svn --version
    5298script: grunt $WP_TRAVISCI
     99notifications:
     100  slack:
     101    rooms:
     102      secure: WuMCpfgrm0GIdPbYzsGOsakZ5x7QIbEBwD+CPHVXGKbL3ZbqQ+BVcDRnMiwzxjgf1vzg2de0taXCSMGKBxsWce23NZkOnmwPdIB8XOnwDV7T7zylgYD5S7p3gI6gV0l8Y3/gROdXFZap6viC1qRr4E79ow53RKk7E3WyOo7TWqo=
     103    on_start: never
     104    on_failure: always
     105    on_success: change
Note: See TracChangeset for help on using the changeset viewer.