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
|
2017-11-02 07:02:42 +00:00
|
|
|
- 7.2
|
2016-08-13 14:40:31 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
2015-05-11 10:30:15 +00:00
|
|
|
before_script:
|
2018-01-28 09:07:51 +00:00
|
|
|
# Deactivate xdebug
|
|
|
|
- if [ -z "$KEEP_XDEBUG" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi
|
2018-01-28 07:28:26 +00:00
|
|
|
- composer install --ignore-platform-reqs
|
2012-11-23 10:51:34 +00:00
|
|
|
|
|
|
|
script:
|
2018-01-28 09:07:51 +00:00
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
|
|
|
|
- stage: Code style
|
|
|
|
php: 7.1
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run
|
|
|
|
- ./vendor/bin/phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n
|
2016-08-16 14:38:24 +00:00
|
|
|
|
2018-01-28 09:07:51 +00:00
|
|
|
- stage: Coverage
|
|
|
|
php: 7.1
|
|
|
|
env: KEEP_XDEBUG=1
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit --debug --coverage-clover coverage-clover.xml
|
|
|
|
after_script:
|
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml
|