Skip to content

Commit

Permalink
Update travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
Riimu committed Jul 8, 2017
1 parent ba1ec1f commit 59057a5
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .travis.yml
Expand Up @@ -13,27 +13,23 @@ cache:
- vendor

before_install:
- if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then phpenv config-rm xdebug.ini; fi
- 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 --no-interaction
- travis_retry composer update -a --no-interaction
- travis_retry wget https://scrutinizer-ci.com/ocular.phar

before_script:
- if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi
- if is_hhvm; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi

script:
- >
if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then
phpdbg -qrr vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover --coverage-text;
else
vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text;
fi
- is_hhvm || mv -v "$XDEBUG.disabled" "$XDEBUG"
- vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text
- is_hhvm || mv -v "$XDEBUG" "$XDEBUG.disabled"
- vendor/bin/phpcs --standard=PSR2 src tests
- vendor/bin/php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no

after_script:
- >
if [[ ! $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then
php ocular.phar code-coverage:upload --format=php-clover coverage.clover;
fi
- is_hhvm || php ocular.phar code-coverage:upload --format=php-clover coverage.clover

0 comments on commit 59057a5

Please sign in to comment.