teqnomaze/code-coverage

Check for the code coverage using the clover report of phpunit.

1.0.0 2021-04-27 17:42 UTC

This package is auto-updated.

Last update: 2024-05-28 00:50:00 UTC


README

A package for checking the code coverage score in percentage using the clover.xml report of phpunit.

Installation

The package can be installed using Composer. Add this repository as a development-time dependency:

composer require --dev teqnomaze/code-coverage

Usage

Run the coverage check script which accepts 2 parameters that are mandatory to return coverage result.

  1. The location of clover.xml file, that's generated by phpunit.
  2. The coverage threshold percentage that's acceptable (Min = 1, Max = 100).
vendor/bin/code-coverage ./build/clover.xml 90

Changelog

1.0.0

  • Created initial version.