.travis.yml
sudo: false
dist: trusty
language: php
cache:
directories:
- vendor
- $HOME/.composer/cache
matrix:
include:
- php: 7.2
env: PHPLINT=1 PHPCS=1
- php: 7.0
env: PHPLINT=1
dist: trusty
before_install:
- |
if [[ "$COVERAGE" != "1" ]]; then
stable='^[0-9\.]+$'
if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
phpenv config-rm xdebug.ini
fi
fi
- |
case "$TRAVIS_PHP_VERSION" in
5.6|5.5|5.4|5.3)
composer global require "phpunit/phpunit:^4"
composer install
PHPUNIT_BIN="phpunit"
;;
5.2)
PHPUNIT_BIN="phpunit"
;;
*)
composer install
PHPUNIT_BIN="vendor/bin/phpunit"
;;
esac
before_script:
- phpenv rehash
script:
- |
if [[ "$PHPLINT" == "1" ]]; then
composer run-script phplint
fi
- |
if [[ "$PHPCS" == "1" ]]; then
composer run-script phpcs
fi
- |
if [[ "$PHPMD" == "1" ]]; then
composer run-script phpmd
fi
notifications:
email: false