2017-09-23 18:55:47 +02:00
|
|
|
dist: trusty
|
2016-08-26 17:21:39 +02:00
|
|
|
language: php
|
|
|
|
|
|
|
|
install:
|
2018-11-09 17:07:36 +01:00
|
|
|
- composer global require dealerdirect/phpcodesniffer-composer-installer;
|
|
|
|
- composer global require phpcompatibility/php-compatibility;
|
2019-03-20 19:27:27 +01:00
|
|
|
- if [[ "$PHPUNIT" ]]; then
|
|
|
|
composer global require phpunit/phpunit ^$PHPUNIT;
|
2018-11-09 17:07:36 +01:00
|
|
|
fi
|
2016-08-26 17:21:39 +02:00
|
|
|
|
|
|
|
script:
|
|
|
|
- phpenv rehash
|
2018-11-09 17:07:36 +01:00
|
|
|
# Run PHP_CodeSniffer on all versions
|
2018-12-07 18:46:34 +01:00
|
|
|
- ~/.config/composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p;
|
2019-03-20 19:27:27 +01:00
|
|
|
# Check PHP compatibility for the lowest and highest supported version
|
|
|
|
- if [[ $TRAVIS_PHP_VERSION == "5.6" || $TRAVIS_PHP_VERSION == "7.3" ]]; then
|
2018-12-28 15:04:25 +01:00
|
|
|
~/.config/composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --extensions=php -p;
|
2018-08-01 18:48:19 +02:00
|
|
|
fi
|
2019-03-20 19:27:27 +01:00
|
|
|
# Run unit tests on highest major version
|
|
|
|
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then
|
|
|
|
~/.config/composer/vendor/bin/phpunit --configuration=phpunit.xml --include-path=lib/;
|
2018-11-09 17:07:36 +01:00
|
|
|
fi
|
2016-09-10 19:10:42 +02:00
|
|
|
|
2019-03-20 19:27:27 +01:00
|
|
|
php:
|
|
|
|
- 7.3
|
|
|
|
|
|
|
|
env:
|
|
|
|
- PHPUNIT=6
|
|
|
|
- PHPUNIT=7
|
|
|
|
- PHPUNIT=8
|
|
|
|
|
2016-09-10 19:10:42 +02:00
|
|
|
matrix:
|
2016-09-10 19:12:55 +02:00
|
|
|
fast_finish: true
|
2017-09-24 18:43:11 +02:00
|
|
|
|
|
|
|
include:
|
|
|
|
- php: 5.6
|
2019-03-20 19:27:27 +01:00
|
|
|
env: PHPUNIT=
|
2017-09-24 18:43:11 +02:00
|
|
|
- php: 7.0
|
2019-03-20 19:27:27 +01:00
|
|
|
- php: 7.1
|
|
|
|
- php: 7.2
|
2017-09-24 18:43:11 +02:00
|
|
|
|
2016-09-10 19:10:42 +02:00
|
|
|
allow_failures:
|
2019-03-20 19:27:27 +01:00
|
|
|
- php: 7.3
|
|
|
|
env: PHPUNIT=7
|
|
|
|
- php: 7.3
|
|
|
|
env: PHPUNIT=8
|