Skip to content

Commit

Permalink
Enable coveralls reports (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-georgiev committed Aug 12, 2018
1 parent 3915255 commit de80fd4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 31 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Expand Up @@ -73,7 +73,16 @@ script:
else
composer check-security;
fi;
- composer run-tests-with-clover
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Tests with reporting in Clover format are skipped for older PHP versions";
composer run-tests;
else
composer run-tests-with-clover;
fi;

after_script:
- php bin/coveralls -v
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Coveralls report is skipped for older PHP versions";
else
bin/php-coveralls -v;
fi;
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -36,6 +36,7 @@
"phpstan/phpstan": "^0.10.2",
"phpstan/phpstan-phpunit": "^0.10.0",
"phpunit/phpunit": "^7.2",
"satooshi/php-coveralls": "^2.0",
"sensiolabs/security-checker": "^4.1",
"symfony/phpunit-bridge": "^3.0|^4.0"
},
Expand Down
45 changes: 16 additions & 29 deletions phpunit.xml
@@ -1,37 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>

colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="false"
convertWarningsToExceptions="true"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
verbose="true"
syntaxCheck="true">

<testsuites>
<testsuite name="Package's Test Suite">
<directory>tests/</directory>
<testsuite>
<directory>./tests</directory>
</testsuite>
</testsuites>

<logging>
<log type="coverage-html" target="docs/tests/coverage/html/" />
<log type="coverage-clover" target="docs/tests/coverage/coverage.xml" />
</logging>


<filter>
<whitelist
addUncoveredFilesFromWhitelist="true"
processUncoveredFilesFromWhitelist="true"
>
<directory>src/</directory>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>

<php>
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
</php>
</phpunit>

</phpunit>

0 comments on commit de80fd4

Please sign in to comment.