Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sinkcup/coverage-badge
create badge from test coverage reports
https://github.com/sinkcup/coverage-badge
badge cli coverage test
Last synced: 23 days ago
JSON representation
create badge from test coverage reports
- Host: GitHub
- URL: https://github.com/sinkcup/coverage-badge
- Owner: sinkcup
- License: mit
- Created: 2021-11-14T13:18:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-01T11:26:52.000Z (about 3 years ago)
- Last Synced: 2024-04-24T13:45:31.903Z (9 months ago)
- Topics: badge, cli, coverage, test
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/test-coverage-badge
- Size: 496 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# test coverage badge
[![CI](https://github.com/sinkcup/coverage-badge/actions/workflows/ci.yml/badge.svg)](https://github.com/sinkcup/coverage-badge/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/sinkcup/coverage-badge/branch/main/graph/badge.svg?token=VQTY6VvfTf)](https://codecov.io/gh/sinkcup/coverage-badge)create coverage badge by parsing test coverage reports.
## Usage
### help
```shell
npx test-coverage-badge --help
```![image](https://user-images.githubusercontent.com/4971414/143799539-7f8fc90d-edc2-4bb3-9735-75e101a0743e.png)
### format
```shell
npx test-coverage-badge --format clover \
./coverage/clover.xml
``````shell
npx test-coverage-badge --format jacoco-xml \
./build/reports/jacoco/test/jacocoTestReport.xml
```### output format
png(default): ![image](https://user-images.githubusercontent.com/4971414/142746070-76763e63-2d0a-469d-a377-e55cea63b2e1.png)
svg:
```shell
npx test-coverage-badge --format clover \
--output-format svg \
./coverage/clover.xml
```text:
```shell
npx test-coverage-badge --format jacoco-xml \
--output-format text \
./build/reports/jacoco/test/jacocoTestReport.xml
``````text
80%
```### output file
default: `./coverage.png` or `./coverage.svg`
custom:
```shell
npx test-coverage-badge --format clover \
--output ./coverage/coverage.png \
./coverage/clover.xml
```