Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codebtech/coveragebadge
Creates code coverage badge based on Clover xml file
https://github.com/codebtech/coveragebadge
badge-generator clover codecoverage composer composer-library composer-package coverage-badge coverage-badges coverage-report phpunit
Last synced: 3 months ago
JSON representation
Creates code coverage badge based on Clover xml file
- Host: GitHub
- URL: https://github.com/codebtech/coveragebadge
- Owner: codebtech
- License: mit
- Created: 2024-05-30T10:51:27.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T14:27:05.000Z (7 months ago)
- Last Synced: 2024-10-31T06:51:35.373Z (3 months ago)
- Topics: badge-generator, clover, codecoverage, composer, composer-library, composer-package, coverage-badge, coverage-badges, coverage-report, phpunit
- Language: PHP
- Homepage: https://packagist.org/packages/codebtech/coveragebadge
- Size: 2.35 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# CoverageBadge
[![PHP lint & test](https://github.com/codebtech/coveragebadge/actions/workflows/php.yml/badge.svg)](https://github.com/codebtech/coveragebadge/actions/workflows/php.yml) ![](./badges/php.svg)
CoverageBadge is a PHP library for creating SVG coverage badges from Clover XML files.
## Installation
`composer require codebtech/coveragebadge --dev`
## Features
- Produces a code coverage badge utilizing a Clover coverage XML file
- Creates a code coverage badge from several Clover XML files, automatically incorporating the coverage percentages
- Accepts a coverage name as an input to include in the generated badge## Usage
- Execute the command to generate badge for single Clover XML input
```
vendor/bin/coverage-badge /path/to/clover.xml /path/to/badge/destination.svg test-name
```
- To blend multiple Clover files, enumerate the XML inputs separated by commas and use the command
```
vendor/bin/coverage-badge /path/to/clover.xml,/path/to/clover2.xml /path/to/badge/destination.svg test-name
```## Acknowledgements
This library is inspired by [JASchilz/PHPCoverageBadge](https://github.com/JASchilz/PHPCoverageBadge)