otis22/php-coverage-checker

Automated code coverage percentage checking

1.2.0 2020-05-10 21:44 UTC

This package is auto-updated.

Last update: 2024-12-11 15:54:18 UTC


README

php-coverage-checker is a library for automated code coverage percentage checking with output coverage per file.

Initial commit is 100% the work of Ocramius: https://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/

Installation

Composer!

composer require --dev otis22/php-coverage-checker

Usage

  1. Generate XML Code Coverage using PHPUnit
  2. Run vendor/bin/php-coverage-checker /path/to/clover.xml <minimum coverage percentage>
    • e.g. vendor/bin/php-coverage-checker build/clover.xml 100

Output

/home/runner/work/php-skelleton/php-skelleton/src/Test.php 100%
Code coverage is 100% - OK!