Filtering out some assemblies in coverage reporting #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | ||
on: | ||
workflow_call: | ||
jobs: | ||
publish-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download test results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: test-results* | ||
- name: Combine coverage reports | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: "**/*.cobertura.xml" | ||
targetdir: "${{ github.workspace }}" | ||
reporttypes: "Cobertura" | ||
verbosity: "Info" | ||
title: "Code Coverage" | ||
tag: "${{ github.run_number }}_${{ github.run_id }}" | ||
customSettings: "" | ||
toolpath: "reportgeneratortool" | ||
assemblyfilters: *.AppHost;CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder.BlazorApp;*.ServiceDefaults;CommunityToolkit.Aspire.Testing | ||
- name: Upload combined coverage XML | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: ${{ github.workspace }}/Cobertura.xml | ||
retention-days: 7 | ||
- name: Publish code coverage report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: "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@v4 | ||
with: | ||
name: coverage-markdown | ||
path: ${{ github.workspace }}/code-coverage-results.md | ||
retention-days: 7 | ||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
recreate: true | ||
path: ${{ github.workspace }}/code-coverage-results.md |