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:
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>
......
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