Skip to content

Commit

Permalink
Merge pull request #177 from Slamdunk/code_coverage
Browse files Browse the repository at this point in the history
Travis: re-enable code-coverage on scrutinizer
  • Loading branch information
Slamdunk authored Sep 25, 2017
2 parents fd1356a + 063ac66 commit 71d299a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ matrix:
- php: 7.0
- php: 7.1
- php: 7.2
env: CODE_COVERAGE=1

addons:
hosts:
Expand All @@ -26,11 +27,15 @@ cache:

install:
- sh .travis/dovecot_install.sh
- phpenv config-rm xdebug.ini || true
- if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
- composer install

script:
- vendor/bin/phpunit
- vendor/bin/phpunit --coverage-clover ./clover.xml

after_script:
- if [ "$CODE_COVERAGE" = 1 ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$CODE_COVERAGE" = 1 ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi

notifications:
email: false
5 changes: 5 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 71d299a

Please sign in to comment.