Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 880 Bytes
language: php
sudo: false
dist: trusty
php:
- 5.6
- 7.0
- 7.1
- hhvm
cache:
directories:
- vendor
before_install:
- export XDEBUG="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
- is_hhvm () { [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; }
- is_hhvm || mv -v "$XDEBUG" "$XDEBUG.disabled"
install:
- travis_retry composer update -a --no-interaction
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
script:
- vendor/bin/phpcs --standard=PSR2 src tests
- vendor/bin/php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no
- if is_hhvm; then echo "xdebug.enable = On" >> /etc/hhvm/php.ini; else mv -v "$XDEBUG.disabled" "$XDEBUG"; fi
- vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text
after_script:
- is_hhvm || php ocular.phar code-coverage:upload --format=php-clover coverage.clover