Skip to content

Commit 582a49d

Browse files
Update DotNetCore_Unit_Tests_Linux.yaml
1 parent 1a2a31c commit 582a49d

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/DotNetCore_Unit_Tests_Linux.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,25 @@ jobs:
8888
dotnet test --no-build -f net9.0 --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.messageFormat=@error\n@trace"
8989
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
9090

91-
- name: Generate Test Results Report
92-
run: |
93-
echo "# Test Results" > $GITHUB_STEP_SUMMARY
94-
sed -i 's/<details>/<details open>/g' ./TestResults-${{ runner.os }}/test-summary.md
95-
cat ./TestResults-${{ runner.os }}/test-summary.md >> $GITHUB_STEP_SUMMARY
96-
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
97-
if: ${{ always() }}
98-
99-
- name: Generated Test Coverage Report
100-
run: |
101-
reportgenerator -reports:./TestResults-${{ runner.os }}/*/*.cobertura.xml -targetdir:./TestResults-${{ runner.os }} -reporttypes:MarkdownSummaryGithub "-title:Test Coverage"
102-
cat ./TestResults-${{ runner.os }}/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
103-
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
104-
if: ${{ always() }}
91+
92+
- name: ReportGenerator
93+
uses: danielpalme/ReportGenerator-GitHub-Action@v5
94+
with:
95+
reports: 'coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
96+
targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved.
97+
reporttypes: 'HtmlInline;Cobertura;MarkdownSummaryGithub' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, OpenCover, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, Html_BlueRed_Summary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, SvgChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
98+
assemblyfilters: '+*' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
99+
classfilters: '+*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
100+
filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
101+
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
102+
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.
103+
license: '' # Optional license for PRO version. Get your license here: https://reportgenerator.io/pro
104+
customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
105+
toolpath: 'reportgeneratortool' # Default directory for installing the dotnet tool.
106+
107+
- name: Publish coverage in build summary # Only applicable if 'MarkdownSummaryGithub' or one of the other Markdown report types is generated
108+
run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY # Adjust path and filename if necessary
109+
shell: bash
105110

106111
- name: Upload dotnet test Artifacts
107112
uses: actions/upload-artifact@main

0 commit comments

Comments
 (0)