Generate code coverage via phpunit

parent 8748bb0d
......@@ -13,7 +13,6 @@ tools:
filter:
excluded_paths:
- docs
- tools
build_failure_conditions:
- '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:
- DB=mysql
- DB=mysqli
before_script:
- if [[ $TRAVIS_PHP_VERSION = '7.1' && $DB = 'sqlite' ]]; then PHPUNIT_FLAGS="--coverage-clover .clover.xml"; else PHPUNIT_FLAGS=""; fi
matrix:
fast_finish: true
include:
......@@ -113,9 +116,10 @@ matrix:
- php: nightly
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:
- 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 @@
<directory>./tests/Doctrine/Tests/DBAL/Performance</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./lib/Doctrine</directory>
</whitelist>
</filter>
<listeners>
<listener class="Doctrine\Tests\DbalPerformanceTestListener"/>
</listeners>
......@@ -59,4 +63,4 @@
<group>performance</group>
</exclude>
</groups>
</phpunit>
\ No newline at end of file
</phpunit>
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