Serverless coverage badge from cobertura XML coverage file with Github Actions.
Example:
name: Make Coverage Badge
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: action-badges/[email protected]
with:
branch-name: badges
- name: Make Coverage Badge
uses: action-badges/[email protected]
with:
file-name: coverage.svg
badge-branch: badges
github-token: '${{ secrets.GITHUB_TOKEN }}'
coverage-file-name: ./coverage.xml
All of the standard action-badges parameters can also be used.