WordPress.org

Make WordPress Core

Changeset 40288


Ignore:
Timestamp:
03/13/17 22:55:28 (7 months 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.0 branch.

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

File:
1 edited

Legend:

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

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