Skip to content

Commit bf88d65

Browse files
committed
Use cleaner hhvm testing in travis
1 parent 25234ff commit bf88d65

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.travis.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,22 @@ cache:
1414

1515
before_install:
1616
- export XDEBUG="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
17-
- if [[ -f "$XDEBUG" ]]; then mv "$XDEBUG" "$XDEBUG.disabled"; fi
17+
- is_hhvm () { [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; }
18+
- is_hhvm || mv -v "$XDEBUG" "$XDEBUG.disabled"
1819

1920
install:
2021
- travis_retry composer update -a --no-interaction
2122
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
2223

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

2627
script:
27-
- >
28-
if [[ -f "$XDEBUG.disabled" ]]; then mv "$XDEBUG.disabled" "$XDEBUG"; fi &&
29-
vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text &&
30-
if [[ -f "$XDEBUG" ]]; then mv "$XDEBUG" "$XDEBUG.disabled"; fi
28+
- is_hhvm || mv -v "$XDEBUG.disabled" "$XDEBUG"
29+
- vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text
30+
- is_hhvm || mv -v "$XDEBUG" "$XDEBUG.disabled"
3131
- vendor/bin/phpcs --standard=PSR2 src tests
3232
- vendor/bin/php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no
3333

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

0 commit comments

Comments
 (0)