Question: is it possible to show coverage report on Pull Request page
antonshell opened this issue · 5 comments
Hello,
I'm tryed to use this github action. Added it to my tests workflow.
It works fine, but I don't understand how to see the report.
In general, I would like to see in Pull Request page.
There is another action: https://github.com/marketplace/actions/clover-code-coverage-report
And there is a posting the comment with report. Is it possible to do something like that?
You can publish the report as an artifact:
- name: Upload coverage report artifact
uses: actions/upload-artifact@v1.0.0
with:
name: CoverageReport # Artifact name
path: coverage # Directory containing files to upload
Ok, thank you! Will try
Hi @danielpalme , can we only publish the artifacts and not see the report on pull request?
Though on downloading-extracting the artifiacts, it shows me all the relevant files.
Am I missing something?
My extension "just" generates the report. It does not add any information to your PRs.
You may want to give this extension a try: https://github.com/marketplace/actions/sticky-pull-request-comment
The workflow would look similar to this:
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.12
with:
reports: 'coverage.xml'
targetdir: 'coveragereport'
reporttypes: 'HtmlInline;Cobertura;MarkdownSummary'
- name: Publish coverage summary
uses: marocchino/sticky-pull-request-comment@v2
with:
path: coveragereport/Summary.md
See also: danielpalme/ReportGenerator#431