fixed travis

This commit is contained in:
Matthias Pfefferle 2018-11-05 22:20:20 +01:00
parent 30b85bf115
commit bd5a0494d4

View file

@ -1,94 +1,95 @@
sudo: false
dist: trusty
language: php language: php
notifications: notifications:
email: email:
on_success: never on_success: never
on_failure: change on_failure: change
php: cache:
- 5.6 directories:
- 7 - vendor
- $HOME/.composer/cache
after_success: bash bin/deploy.sh after_success: bash bin/deploy.sh
env: env:
matrix: matrix:
- WP_VERSION=latest WP_MULTISITE=0 - WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=nightly WP_MULTISITE=0
global: global:
- SVN_REPO: https://plugins.svn.wordpress.org/activitystream-extension/ - WP_TRAVISCI=travis:phpunit
- GH_REF: https://github.com/pfefferle/wordpress-activitystream-extension.git - SVN_REPO: https://plugins.svn.wordpress.org/activitypub/
- secure: "mNWrMScJrvoABY89j7eWG33cQnaIzvZ5q32bMhZO5kVVqiCI+XVKZuf7vC2DdSeF7BHTgh9PdkkkAzhW/6yhOT1IEXfRMF/5U1JrWbGkN5ByKH0cdxbExmuxKd1sSRC3zxkL7LYoE8vVhR6SXwuqyqa9uBNphJPvV+c6dHNwIjawPbJMlakUXc6a3hZSJbScn5F1a293jgc4Oe2souC1Hds/RTw2igoDdGqY1GC9J6EpXeCETltQcd1HKi+KD2kG47gBWb1B9JTKfkXH7x93wGYUq2JMb0FRzaCe/JzKcEkeyqdZgg/8IkxigY7uRxECF+amu+g5iO4fWPt4KgtoBno1+q4M3T9YHOZ4tv9iJ7Z9jjO/zraeIcXCC0mHP8m3Wqg4D4LWOWtCL+r/iCPIZN/26fQjOtH3MIrpWYEIw6BTrCMRxxYaf7ipc0xzw1rL8IJWRWyMYt21LinuQqAF8K8NMgQPXRbUJ0o6MThyBZuo15otz95cIoXc7ofJcZvEnBe3kwylUKSrO8QCrbfscMzd7wu1KXBDWGWM8jQA0PDN0cYLBIJuqrrLO9w0b3nhsqkuwbmOJG9yIySUkKQMKFIJ6rn7O2qWibNKMGoJWtyM+NOmJ4TlbyOGwSRtjxInUTUlecCZ9WoIwMb1JcB7YH8XAmeMAuRrooPOEx3n8xo=" - GH_REF: https://github.com/pfefferle/wordpress-activitypub.git
- secure: "mNWrMScJrvoABY89j7eWG33cQnaIzvZ5q32bMhZO5kVVqiCI+XVKZuf7vC2DdSeF7BHTgh9PdkkkAzhW/6yhOT1IEXfRMF/5U1JrWbGkN5ByKH0cdxbExmuxKd1sSRC3zxkL7LYoE8vVhR6SXwuqyqa9uBNphJPvV+c6dHNwIjawPbJMlakUXc6a3hZSJbScn5F1a293jgc4Oe2souC1Hds/RTw2igoDdGqY1GC9J6EpXeCETltQcd1HKi+KD2kG47gBWb1B9JTKfkXH7x93wGYUq2JMb0FRzaCe/JzKcEkeyqdZgg/8IkxigY7uRxECF+amu+g5iO4fWPt4KgtoBno1+q4M3T9YHOZ4tv9iJ7Z9jjO/zraeIcXCC0mHP8m3Wqg4D4LWOWtCL+r/iCPIZN/26fQjOtH3MIrpWYEIw6BTrCMRxxYaf7ipc0xzw1rL8IJWRWyMYt21LinuQqAF8K8NMgQPXRbUJ0o6MThyBZuo15otz95cIoXc7ofJcZvEnBe3kwylUKSrO8QCrbfscMzd7wu1KXBDWGWM8jQA0PDN0cYLBIJuqrrLO9w0b3nhsqkuwbmOJG9yIySUkKQMKFIJ6rn7O2qWibNKMGoJWtyM+NOmJ4TlbyOGwSRtjxInUTUlecCZ9WoIwMb1JcB7YH8XAmeMAuRrooPOEx3n8xo="
matrix: matrix:
include: include:
- php: 7.2 - php: 7.2
- php: 7.1 - php: 7.1
- php: 7.0 - php: 7.0
- php: 5.6 - php: 5.6
- php: 5.6 - php: 5.6
env: WP_PLUGIN_DEPLOY=1 env: WP_PLUGIN_DEPLOY=1
- php: 5.5 - php: 5.5
- php: 5.4 - php: 5.4
- php: 5.3 - php: 5.3
dist: precise dist: precise
- php: 5.2 - php: 5.2
dist: precise dist: precise
before_script: before_script:
- | - |
# Remove Xdebug for a huge performance increase: # Remove Xdebug for a huge performance increase:
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini phpenv config-rm xdebug.ini
else else
echo "xdebug.ini does not exist" echo "xdebug.ini does not exist"
fi fi
- | - |
# Export Composer's global bin dir to PATH: # Export Composer's global bin dir to PATH:
composer config --list --global composer config --list --global
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }` export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
- | - |
# Install the specified version of PHPUnit depending on the PHP version: # Install the specified version of PHPUnit depending on the PHP version:
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
case "$TRAVIS_PHP_VERSION" in case "$TRAVIS_PHP_VERSION" in
7.2|7.1|7.0|nightly) 7.2|7.1|7.0|nightly)
echo "Using PHPUnit 6.x" echo "Using PHPUnit 6.x"
composer global require "phpunit/phpunit:^6" composer global require "phpunit/phpunit:^6"
;; ;;
5.6|5.5|5.4|5.3) 5.6|5.5|5.4|5.3)
echo "Using PHPUnit 4.x" echo "Using PHPUnit 4.x"
composer global require "phpunit/phpunit:^4" composer global require "phpunit/phpunit:^4"
;; ;;
5.2) 5.2)
# Do nothing, use default PHPUnit 3.6.x # Do nothing, use default PHPUnit 3.6.x
echo "Using default PHPUnit, hopefully 3.6" echo "Using default PHPUnit, hopefully 3.6"
;; ;;
*) *)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1 exit 1
;; ;;
esac esac
fi fi
if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then
composer install composer install
fi fi
- mysql --version - mysql --version
- phpenv versions - phpenv versions
- php --version - php --version
- php -m - php -m
- which phpunit - which phpunit
- phpunit --version - phpunit --version
- curl --version - curl --version
- grunt --version - grunt --version
- git --version - git --version
- svn --version - svn --version
- locale -a - locale -a
before_install: before_install:
- export PATH="$HOME/.composer/vendor/bin:$PATH" - export PATH="$HOME/.composer/vendor/bin:$PATH"
- | - |
if [[ ! -z "$WP_VERSION" ]] ; then if [[ ! -z "$WP_VERSION" ]] ; then
set -e set -e
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION