Commit 71d28a60 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #2758 from malukenho/feature/add-scrutnizer

Generate code coverage via phpunit
parents 50343162 93629c5b
...@@ -13,7 +13,6 @@ tools: ...@@ -13,7 +13,6 @@ tools:
filter: filter:
excluded_paths: excluded_paths:
- docs - docs
- tools
build_failure_conditions: build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed - 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
......
set -x
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] ; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover ./clover.xml
fi
...@@ -15,6 +15,9 @@ env: ...@@ -15,6 +15,9 @@ env:
- DB=mysql - DB=mysql
- DB=mysqli - DB=mysqli
before_script:
- if [[ $TRAVIS_PHP_VERSION = '7.1' && $DB = 'sqlite' ]]; then PHPUNIT_FLAGS="--coverage-clover .clover.xml"; else PHPUNIT_FLAGS=""; fi
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
...@@ -113,9 +116,10 @@ matrix: ...@@ -113,9 +116,10 @@ matrix:
- php: nightly - php: nightly
after_script: after_script:
- sh .travis.coverage.sh - if [[ "$PHPUNIT_FLAGS" != "" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$PHPUNIT_FLAGS" != "" ]]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi
install: install:
- travis_retry composer install - travis_retry composer install
script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml $PHPUNIT_FLAGS
...@@ -49,7 +49,11 @@ ...@@ -49,7 +49,11 @@
<directory>./tests/Doctrine/Tests/DBAL/Performance</directory> <directory>./tests/Doctrine/Tests/DBAL/Performance</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./lib/Doctrine</directory>
</whitelist>
</filter>
<listeners> <listeners>
<listener class="Doctrine\Tests\DbalPerformanceTestListener"/> <listener class="Doctrine\Tests\DbalPerformanceTestListener"/>
</listeners> </listeners>
...@@ -59,4 +63,4 @@ ...@@ -59,4 +63,4 @@
<group>performance</group> <group>performance</group>
</exclude> </exclude>
</groups> </groups>
</phpunit> </phpunit>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment