library php-coverage-badger
Create a code coverage badge from a PHPUnit Clover XML file.
jaschilz/php-coverage-badger
Create a code coverage badge from a PHPUnit Clover XML file.
- Friday, July 28, 2017
- by JASchilz
- Repository
- 1 Watchers
- 2 Stars
- 5,579 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 2 Forks
- 0 Open issues
- 4 Versions
- 50 % Grown
PHPCoverageBadge
PHPCoverageBadge is a library for creating an SVG coverage badge from a PHPUnit Clover XML file., (*1)
Installation
Composer!, (*2)
composer require --dev jaschilz/php-coverage-badger
, (*3)
Usage
- Generate XML Code Coverage using PHPUnit
- Run
vendor/bin/php-coverage-badger /path/to/clover.xml /path/to/badge/destination.svg
- e.g.
vendor/bin/php-coverage-badger build/clover.xml report/coverage.svg
Acknowledgements
This library is forked from Michael Moussa's php-coverage-checker, derived from Marco Pivetta's post on CI test coverage checks, (*4)
Inspiration for generating an SVG badge from coverage results is taken from the coverage-badge Python library, derived from the Shields.io project., (*5)