Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevin940726/coverbadge
:100: Create a coverage badge without any service provider.
https://github.com/kevin940726/coverbadge
badge circleci coverage sheilds
Last synced: about 2 months ago
JSON representation
:100: Create a coverage badge without any service provider.
- Host: GitHub
- URL: https://github.com/kevin940726/coverbadge
- Owner: kevin940726
- License: mit
- Created: 2017-06-09T17:56:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-13T02:05:56.000Z (over 7 years ago)
- Last Synced: 2024-10-28T23:54:11.654Z (about 2 months ago)
- Topics: badge, circleci, coverage, sheilds
- Language: JavaScript
- Homepage: https://npm.im/coverbadge
- Size: 126 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coverbadge
Create a coverage badge without any service provider.[![CircleCI](https://circleci.com/gh/kevin940726/coverbadge.svg?style=shield)](https://circleci.com/gh/kevin940726/coverbadge)
## See it in action
[![coverage](https://circleci-tkn.rhcloud.com/api/v1/project/kevin940726/coverbadge/tree/master/latest/artifacts/badge.svg)](https://circleci-tkn.rhcloud.com/api/v1/project/kevin940726/coverbadge/tree/master/latest/artifacts/index.html)
> 💯 Coverage increased (+1.81%) to 100%.
## Installation
```sh
yarn add -D coverbadge
# OR
npm install --save-dev coverbadge
```## Usage
```sh
cat coverage/lcov.info | coverbadge [-o ]
```### `-o`, `--out-file`
Specify output path to save the badge image. Defaults to `badge.svg` under your project root.
`-o coverage/badge.svg` will output the image under your `coverage` folder.
> If you want it to calculate the difference between current and last coverage, you should not delete the old svg path for every build. If you put it in `coverage` folder and your script remove the folder for every test, you will have to copy the image before removing it, and paste it back to folder immediately after tests and before running this program.
## Author
Kai Hao
## License
MIT