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.

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

See #35105, #40100, #30755


git-svn-id: https://develop.svn.wordpress.org/branches/4.3@40277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-03-11 02:43:29 +00:00
parent 00b1aadc8e
commit 559e0b2c97

View File

@ -35,15 +35,63 @@ before_install:
fi
before_script:
- |
stable='^[0-9\.]+$';
# Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
stable='^[0-9\.]+$'
if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
phpenv config-rm xdebug.ini
phpenv config-rm xdebug.ini
fi
- npm install -g npm
- |
# Export Composer's global bin dir to PATH, but not on PHP 5.2:
if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
composer config --list --global
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
fi
- |
# Install the specified version of PHPUnit depending on the PHP version:
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
case "$TRAVIS_PHP_VERSION" in
7.1|7.0|hhvm|nightly)
echo "Using PHPUnit 5.7"
composer global require "phpunit/phpunit=5.7.*"
;;
5.6|5.5|5.4|5.3)
echo "Using PHPUnit 4.8"
composer global require "phpunit/phpunit=4.8.*"
;;
5.2)
# Do nothing, use default PHPUnit 3.6.x
echo "Using default PHPUnit, hopefully 3.6"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1
;;
esac
fi
- npm --version
- node --version
- nvm install 4.7.2
- npm install -g grunt-cli
- npm install
- php --version
- |
# Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
php -m
fi
- npm --version
- node --version
- which phpunit
- phpunit --version
- curl --version
- grunt --version
- git --version
- svn --version
script: grunt $WP_TRAVISCI
notifications:
slack:
secure: "ln2sC0yUOMzGGJ9PR56cxafCO2YSBQtFs0JuoSjvmXN0+jCGbQL781z2osEJ24BEl4o3zMLfiFPgieM7D+VuRObU6TiVFLmbebgoSyW/1Gs+jPNxBXPKOSLE3/4CV8ifyhm5XZr2xT6z8OWC6StHl2nPis4wZ91UHbj6FhlMyFM="
rooms:
secure: WuMCpfgrm0GIdPbYzsGOsakZ5x7QIbEBwD+CPHVXGKbL3ZbqQ+BVcDRnMiwzxjgf1vzg2de0taXCSMGKBxsWce23NZkOnmwPdIB8XOnwDV7T7zylgYD5S7p3gI6gV0l8Y3/gROdXFZap6viC1qRr4E79ow53RKk7E3WyOo7TWqo=
on_start: never
on_failure: always
on_success: change