sudo: false dist: trusty language: php notifications: email: on_success: never on_failure: change cache: directories: - vendor - "$HOME/.composer/cache" after_success: curl -L https://raw.githubusercontent.com/pfefferle/wordpress-activitypub/master/bin/deploy.sh | bash env: matrix: - WP_VERSION=latest WP_MULTISITE=0 global: - WP_TRAVISCI=travis:phpunit - SVN_REPO: https://plugins.svn.wordpress.org/activitypub/ - GH_REF: https://github.com/pfefferle/wordpress-activitypub.git - secure: k6uZL/zVYvuSsG4tUMvVC6+DTYKSueOYj6j9csKSa08EzPl0JLPoNN/5MPihi+zZkBPLL+KjBgUUYfBtdcOh/xwPb+lilg5UnvM7TKQEG583RtBbohADvahQHN4mxZb6yBvrmvbB5jNtf+3L4RcOgdONEb2CpGo5n8RRM3MXxF4WSn9s+F+P0fvWCpcZnM9yqgbTJNUaZHw4tRWQ7eYZ5kFxSxKSnZd5+149UAh2YcKjA+ix3rrK0ClOlGaMVZz+SV4/qoNwamxMTMAQ6Be1wIelXz0n92FIonw6euDfBSgNLg+WLiAYoqaM+tEluLV1DRcx5TLUfmAOGli6pEfqL6XZxf8iZheMtn5Ir0nR4vLbOUKEojqEpLwmlUjiTN6RSZbPMquBNz/lOEQd9S/EzPLrtvlBRYAq0EmI62KtXVG+vHta2TTF+LS0caXjVZaHcpF4SYmuG5WyR6d0KpnVw6czvXu7hyq2sNz6lj1hUt15pPZO8tFkJFTs87pOBfEj/GnjIE4Iab2HA/HgdWqFpB+5ZAWH9QDIa9c3+QUQQf2qA7Z1yS0c5SBn/TE+0O3yomyBTD63Zc7gNG2qqw+THql5fzG3iGV5M6db+yTY0INfsJYuRjQXpn9Q35ZTxgXEEvu7naHh162wa14K18zzXoVEjhywOoW3X1Qiz6VFK8s= matrix: include: - php: 7.2 - php: 7.1 - php: 7.0 - php: 5.6 - php: 5.6 env: WP_PLUGIN_DEPLOY=1 - php: 5.5 - php: 5.4 - php: 5.3 dist: precise before_script: - | # Remove Xdebug for a huge performance increase: if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then phpenv config-rm xdebug.ini else echo "xdebug.ini does not exist" fi - | # Export Composer's global bin dir to PATH: composer config --list --global 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: if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then case "$TRAVIS_PHP_VERSION" in 7.2|7.1|7.0|nightly) echo "Using PHPUnit 6.x" composer global require "phpunit/phpunit:^6" ;; 5.6|5.5|5.4|5.3) echo "Using PHPUnit 4.x" composer global require "phpunit/phpunit:^4" ;; 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 if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then composer install fi - mysql --version - phpenv versions - php --version - php -m - which phpunit - phpunit --version - curl --version - grunt --version - git --version - svn --version - locale -a before_install: - export PATH="$HOME/.composer/vendor/bin:$PATH" - | if [[ ! -z "$WP_VERSION" ]] ; then set -e bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION set +e fi script: - | if [[ ! -z "$WP_VERSION" ]] ; then # Run the build because otherwise there will be a bunch of warnings about # failed `stat` calls from `filemtime()`. echo Running with the following versions: php -v phpunit --version # Run PHPUnit tests phpunit || exit 1 WP_MULTISITE=1 phpunit || exit 1 fi - | if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then ./vendor/bin/phpcs -p -s -v -n --standard=./phpcs.ruleset.xml --extensions=php fi