activity-log/.travis.yml
EiraChris 691bc0a880
Change: Improve Travis build performance
Improve the Travis build performance by adding caching and disabling XDebug.
2017-09-26 01:20:19 +01:00

50 lines
1.3 KiB
YAML

# Travis CI Configuration File.
sudo: false
language: php
# Caching to improve build times.
cache:
apt: true
directories:
- node_modules
- vendor
- $HOME/.composer/cache
# PHP versions to run tests against.
php:
- 5.4
- 5.5
- 5.6
- 7.0
# WordPress versions to run tests against.
env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
- WP_VERSION=4.4 WP_MULTISITE=0
- WP_VERSION=4.4 WP_MULTISITE=1
- WP_VERSION=4.5 WP_MULTISITE=0
- WP_VERSION=4.5 WP_MULTISITE=1
- WP_VERSION=4.6 WP_MULTISITE=0
- WP_VERSION=4.6 WP_MULTISITE=1
- WP_VERSION=4.7 WP_MULTISITE=0
- WP_VERSION=4.7 WP_MULTISITE=1
before_script:
- |
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
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
else
composer global require "phpunit/phpunit=4.8.*"
fi
- phpunit --version
script: phpunit --coverage-clover=coverage.xml