CodeCoverageSummary
CodeCoverageSummary copied to clipboard
Badge Showing Coverage % for main branch for README.md file?
Looking at the existing badge support I see it is generating an image like this one:

This works fine in the PR comment but I'd like to include a badge in my project README with the latest coverage value from the main branch. Is this something this tool can help with, or does that require some separate service that would host the image?
Looking at the various shields.io branches for coverage, none of these seem like they would work with CodeCoverageSummary: https://shields.io/category/coverage
Thanks for any tips.
Hi @ardalis, at the moment CCS doesn't produce a badge for the readme but it is a feature I'd like to have.
Ideally CCS would download the badge from shields.io and save it to a fixed location for the readme to reference. I've considered saving the badge to the root of the repo running the action but I'm not happy with that solution. I really don't want to write to users' repos.
If you have any ideas I'm open to suggestions.
While looking for the latest in solving this problem the most promising item I found was this one. It's hacky but leverages gists rather than actual repo access:
https://dev.to/thejaredwilcurt/coverage-badge-with-github-actions-finally-59fa
HTH.
That is an interesting solution. If I incorporate uploading the json file into CCS then the user would need to create a gist and supply its id and a PAT in the workflow. That doesn't sound too bad.