Skip to content

Commit b0a8ab8

Browse files
committed
improve the configuration for Travis CI
* update to latest Composer version * generate code coverage reports only on PHP 7 builds * disable Xdebug when not needed
1 parent d07082e commit b0a8ab8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@ env:
1111
- deps=""
1212

1313
php:
14-
- 5.3
1514
- 5.4
1615
- 5.5
1716
- 5.6
18-
- 7.0
1917
- hhvm
2018

2119
matrix:
2220
fast_finish: true
2321
include:
2422
- php: 5.3
2523
env: deps="low"
24+
- php: 7.0
25+
env: xdebug="yes"
26+
27+
before_install:
28+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" && "$xdebug" != "yes" ]]; then phpenv config-rm xdebug.ini; fi
29+
- composer self-update
2630

2731
install:
2832
- if [ "$deps" = "low" ]; then composer update --prefer-lowest --prefer-stable; fi
2933
- if [ "$deps" = "" ]; then composer install; fi
3034

3135
script:
32-
- phpunit --coverage-clover=coverage.clover
33-
- wget https://scrutinizer-ci.com/ocular.phar
34-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
36+
- if [[ "$xdebug" = "yes" ]]; then phpunit --coverage-clover=coverage.clover; else phpunit; fi
37+
- if [[ "$xdebug" = "yes" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
38+
- if [[ "$xdebug" = "yes" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

0 commit comments

Comments
 (0)