2012-11-23 10:51:34 +00:00
|
|
|
language: php
|
2017-04-16 06:33:59 +00:00
|
|
|
dist: trusty
|
|
|
|
sudo: false
|
2012-11-23 10:51:34 +00:00
|
|
|
|
|
|
|
php:
|
2014-07-09 10:18:09 +00:00
|
|
|
- 5.6
|
2015-05-24 13:58:16 +00:00
|
|
|
- 7.0
|
2016-08-13 14:45:37 +00:00
|
|
|
- 7.1
|
2014-07-09 10:18:09 +00:00
|
|
|
- hhvm
|
2016-08-13 14:40:31 +00:00
|
|
|
|
2014-07-09 10:18:09 +00:00
|
|
|
matrix:
|
2016-10-02 07:06:40 +00:00
|
|
|
include:
|
2017-02-23 02:42:52 +00:00
|
|
|
- php: 7.1
|
2016-10-02 07:06:40 +00:00
|
|
|
env: COVERAGE=1
|
2015-05-11 10:30:15 +00:00
|
|
|
allow_failures:
|
|
|
|
- php: hhvm
|
|
|
|
|
2016-08-13 14:40:31 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
2015-05-11 10:30:15 +00:00
|
|
|
before_script:
|
2016-10-02 07:06:40 +00:00
|
|
|
# Deactivate xdebug if we don't do code coverage
|
|
|
|
- if [ -z "$COVERAGE" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi
|
2016-08-13 14:40:31 +00:00
|
|
|
- composer install
|
2012-11-23 10:51:34 +00:00
|
|
|
|
|
|
|
script:
|
2016-10-02 07:06:40 +00:00
|
|
|
# PHP_CodeSniffer
|
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --standard=PSR2 -n ; fi
|
|
|
|
# PHP-CS-Fixer
|
2016-12-26 02:58:39 +00:00
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run ; fi
|
2016-10-02 07:06:40 +00:00
|
|
|
# PHPUnit
|
|
|
|
- ./vendor/bin/phpunit $(if [ -n "$COVERAGE" ]; then echo --debug --coverage-clover coverage-clover.xml ; fi)
|
2016-08-16 14:38:24 +00:00
|
|
|
|
|
|
|
after_script:
|
2016-10-02 07:06:40 +00:00
|
|
|
- if [ -n "$COVERAGE" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml ; fi
|