An open API service indexing awesome lists of open source software.

https://github.com/dannypsnl/cover-badge

A badge generator for coverage
https://github.com/dannypsnl/cover-badge

coverage-report racket

Last synced: about 1 month ago
JSON representation

A badge generator for coverage

Awesome Lists containing this project

README

        

# cover-badge

A badge generator for coverage, based on https://badgen.net/https and https://github.com/florence/cover.

### Installation & Usage

```shell
raco pkg install --auto cover-badge
```

This `raco` plugin requires you run `raco cover` first, for example, in CI flow you can write

```racket
raco cover -b .
raco cover-badge
```

Deploy directory `/coverage/` to any place, e.g. GitHub pages. Then you can access the `badge.json`, for example, if you put the `coverage/` to GitHub pages. You might have an URL `https://.github.io//coverage/badge.json`, all you need now is the following:

```markdown
![](https://badgen.net/https/.github.io//coverage/badge.json)
```

For instances

```markdown
[![](https://badgen.net/https/dannypsnl.github.io/syntax-extension/coverage/badge.json)](https://dannypsnl.github.io/syntax-extension/coverage)
[![](https://badgen.net/https/dannypsnl.github.io/sauron/coverage/badge.json)](https://dannypsnl.github.io/sauron/coverage)
```

Result:

[![](https://badgen.net/https/dannypsnl.github.io/syntax-extension/coverage/badge.json)](https://dannypsnl.github.io/syntax-extension/coverage)
[![](https://badgen.net/https/dannypsnl.github.io/sauron/coverage/badge.json)](https://dannypsnl.github.io/sauron/coverage)