GitHub Action
Clover to ShieldsIO endpoint JSON
This action uses the metrics
of a clover.xml
to calculate a code-coverage percentage and generates a JSON file for ShieldsIOs enpdoint badges.
The resulting JSON file could be deployed to a custom server or probably to GitHub Pages using the Deploy to GitHub Pages action.
The badge generated based on the resulting JSON file could look something like this:
- name: "Coverage processing"
uses: steffendietz/clover-to-shieldsio-json-action@v1.0
with:
path-to-clover: "clover.xml"
path-to-json: "build/shieldsio-coverage.json"
style: "flat-square"
required
Relative path from repository root to clover.xml.
Defaults to: clover.xml
required
Relative path from repository root where ShieldsIO endpoint JSON is created.
Defaults to: shieldsio.json
The left text of the badge; empty to omit left side.
Defaults to: coverage
The badge style.
Defaults to: flat
Below this coverage percent, the color will be bad-color
.
Defaults to: 50
Below this coverage percent, the color will be average-color
.
Defaults to: 75
Below this coverage percent, the color will be above-average-color
.
Defaults to: 95
The color used for bad code coverage.
Defaults to: red
The color used for average code coverage.
Defaults to: yellow
The color used for above average code coverage.
Defaults to: green
The color used for good code coverage.
Defaults to: brightgreen