Skip to content

Commit 54cccf3

Browse files
committed
Produce code coverage only once
1 parent 227ac2d commit 54cccf3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ php:
44
- 5.3
55
- 5.4
66
- 5.5
7-
- 5.6
87
- hhvm
98

109
branches:
@@ -32,6 +31,10 @@ matrix:
3231
env:
3332
- SYMFONY_VERSION='2.7.*@dev'
3433
- FRAMEWORK_EXTRA_VERSION='~3.0'
34+
- php: 5.6
35+
env:
36+
- PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
37+
- COVERAGE=true
3538

3639
# only needed for the hackaround for https://github.com/symfony/symfony/issues/12868
3740
before_install:
@@ -47,13 +50,13 @@ before_script:
4750
- sudo pip install -r Resources/doc/requirements.txt
4851

4952
script:
50-
- phpunit --coverage-clover=coverage.clover
53+
- phpunit ${PHPUNIT_FLAGS}
5154
- make -C Resources/doc SPHINXOPTS='-nW' html
5255
- make -C Resources/doc spelling
5356

5457
after_script:
55-
- wget https://scrutinizer-ci.com/ocular.phar
56-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
58+
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
59+
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
5760

5861
after_failure:
5962
- cat /tmp/fos-http-cache-bundle/logs/test.log

0 commit comments

Comments
 (0)