2017-09-23 19:55:47 +03:00
|
|
|
dist: trusty
|
2016-08-26 18:21:39 +03:00
|
|
|
language: php
|
|
|
|
|
|
|
|
install:
|
2018-11-09 19:07:36 +03:00
|
|
|
- composer global require dealerdirect/phpcodesniffer-composer-installer;
|
|
|
|
- composer global require phpcompatibility/php-compatibility;
|
2019-03-20 21:27:27 +03:00
|
|
|
- if [[ "$PHPUNIT" ]]; then
|
|
|
|
composer global require phpunit/phpunit ^$PHPUNIT;
|
2018-11-09 19:07:36 +03:00
|
|
|
fi
|
2016-08-26 18:21:39 +03:00
|
|
|
|
|
|
|
script:
|
|
|
|
- phpenv rehash
|
2018-11-09 19:07:36 +03:00
|
|
|
# Run PHP_CodeSniffer on all versions
|
2018-12-07 20:46:34 +03:00
|
|
|
- ~/.config/composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p;
|
2019-03-20 21:27:27 +03: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 17:04:25 +03:00
|
|
|
~/.config/composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --extensions=php -p;
|
2018-08-01 19:48:19 +03:00
|
|
|
fi
|
2019-03-20 21:27:27 +03: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 19:07:36 +03:00
|
|
|
fi
|
2016-09-10 20:10:42 +03:00
|
|
|
|
2019-03-20 21:27:27 +03:00
|
|
|
php:
|
|
|
|
- 7.3
|
|
|
|
|
|
|
|
env:
|
|
|
|
- PHPUNIT=6
|
|
|
|
- PHPUNIT=7
|
|
|
|
- PHPUNIT=8
|
|
|
|
|
2016-09-10 20:10:42 +03:00
|
|
|
matrix:
|
2016-09-10 20:12:55 +03:00
|
|
|
fast_finish: true
|
2017-09-24 19:43:11 +03:00
|
|
|
|
|
|
|
include:
|
|
|
|
- php: 5.6
|
2019-03-20 21:27:27 +03:00
|
|
|
env: PHPUNIT=
|
2017-09-24 19:43:11 +03:00
|
|
|
- php: 7.0
|
2019-03-20 21:27:27 +03:00
|
|
|
- php: 7.1
|
|
|
|
- php: 7.2
|
2017-09-24 19:43:11 +03:00
|
|
|
|
2016-09-10 20:10:42 +03:00
|
|
|
allow_failures:
|
2019-03-20 21:27:27 +03:00
|
|
|
- php: 7.3
|
|
|
|
env: PHPUNIT=7
|
|
|
|
- php: 7.3
|
|
|
|
env: PHPUNIT=8
|