Download the PHP package beporter/coverage-ensure without Composer
On this page you can find all versions of the php package beporter/coverage-ensure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beporter/coverage-ensure
More information about beporter/coverage-ensure
Files in beporter/coverage-ensure
Package coverage-ensure
Short Description PHP CLI script that reads clover.xml coverage reports and returns non-zero when percent coverage is below specified threshold. Intended for use with automated test/build tools like Travis CI, Circle CI and Jenkins.
License MIT
Homepage https://github.com/beporter/php-coverage-ensure
Informations about the package coverage-ensure
php-coverage-ensure
A composer package that provides a PHP CLI script able to clover.xml coverage reports and return non-zero when percent coverage is below specified threshold. Intended for use with automated test/build tools like Travis CI, Circle CI and Jenkins.
Requirements
- PHP 7.0+
- php-xdebug extension
- phpunit, for generating code coverage reports
Installation
Usage
Before calling the script, you must produce a clover coverage report for your project. This can be done with PHPUnit.
Then call the script providing the path to a clover XML coverage report file and an optional minimum acceptable percentage.
Advanced Usage
If you want PHPUnit to always generate a clover report, you can also add the following block to your phpunit.xml
or phpunit.xml.dist
file:
This package also includes a helper script that can determine the location of your clover report file by reading your phpunit config file:
Contributing
Code of Conduct
Please note that this project is released with a Translations are available.
Reporting Issues
Please use GitHub Isuses for listing any known defects or issues.
Development
Please fork this repository, create a new topic branch, and submit a pull request for your work.
Credits
This work was originally done as a part of loadsys/cakephp-shell-scripts and broken out here for greater portability/reuse.
License
MIT
Copyright
Copyright © 2018 Brian Porter