csharp-sdk/.github/workflows/ci-code-coverage.yml
dependabot[bot] f006ff9f5d
Bump actions/checkout from 4.2.2 to 5.0.0 (#851)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 17:27:39 +03:00

67 lines
2.1 KiB
YAML

name: Code Coverage
on:
workflow_call:
permissions:
contents: read
jobs:
publish-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
with:
dotnet-version: |
10.0.x
9.0.x
- name: Download test results
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
pattern: testresults-*
- name: Combine coverage reports
uses: danielpalme/ReportGenerator-GitHub-Action@5.4.17
with:
reports: "**/*.cobertura.xml"
targetdir: "${{ github.workspace }}/report"
reporttypes: "HtmlSummary;Cobertura;MarkdownSummary;MarkdownSummaryGithub"
verbosity: "Info"
title: "Code Coverage"
tag: "${{ github.run_number }}_${{ github.run_id }}"
customSettings: ""
toolpath: "reportgeneratortool"
- name: Upload combined coverage XML
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage
path: ${{ github.workspace }}/report
retention-days: 7
- name: Publish code coverage report
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
with:
filename: "report/Cobertura.xml"
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: "60 80"
- name: Upload combined coverage markdown
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-markdown
path: ${{ github.workspace }}/code-coverage-results.md
retention-days: 7
- name: Coverage on step summary
if: always()
run: cat "${{ github.workspace }}/report/SummaryGithub.md" >> $GITHUB_STEP_SUMMARY