Skip to content

Commit d29e1a7

Browse files
author
abdulrahmanshabeekmohamed
committed
uncomment steps to install .NET Report Generator and generate test reports in GitHub Actions workflow
1 parent f071f97 commit d29e1a7

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

.github/workflows/build-blazor-app.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
- name: Build Blazor Project
7474
run: dotnet build ./Web/Web.csproj --configuration Release --no-restore
7575

76-
# - name: Install .NET Report Generator
77-
# run: dotnet tool install -g dotnet-reportgenerator-globaltool
76+
- name: Install .NET Report Generator
77+
run: dotnet tool install -g dotnet-reportgenerator-globaltool
7878

7979
- name: Run Test
8080
run: dotnet test ./UITests/UITests.csproj --configuration Release --settings ./UITests/ilovedotnet.runsettings --verbosity normal --logger trx --collect:"XPlat Code Coverage"
@@ -87,34 +87,34 @@ jobs:
8787
# path: '**/*.trx'
8888
# reporter: dotnet-trx
8989

90-
# - name: Generate Test Report
91-
# run: reportgenerator -reports:./**/Coverage.cobertura.xml -targetdir:"./Test/Report" -reporttypes:Html
90+
- name: Generate Test Report
91+
run: reportgenerator -reports:./**/Coverage.cobertura.xml -targetdir:"./Test/Report" -reporttypes:Html
9292

93-
- name: ReportGenerator
94-
# You may pin to the exact commit or the version.
95-
# uses: danielpalme/ReportGenerator-GitHub-Action@2a2d60ea1c7e811f54684179af6ac1ae8c1ce69a
96-
uses: danielpalme/[email protected]
97-
with:
98-
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
99-
targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
100-
reporttypes: 'HtmlInline;Cobertura'
93+
# - name: ReportGenerator
94+
# # You may pin to the exact commit or the version.
95+
# # uses: danielpalme/ReportGenerator-GitHub-Action@2a2d60ea1c7e811f54684179af6ac1ae8c1ce69a
96+
# uses: danielpalme/[email protected]
97+
# with:
98+
# reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
99+
# targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
100+
# reporttypes: 'HtmlInline;Cobertura'
101101

102-
- name: Publish Code Coverage Report
103-
uses: irongut/[email protected]
104-
with:
105-
filename: "Cobertura.xml"
106-
badge: true
107-
fail_below_min: false # just informative for now
108-
format: markdown
109-
hide_branch_rate: false
110-
hide_complexity: false
111-
indicators: true
112-
output: both
113-
thresholds: "10 30"
102+
# - name: Publish Code Coverage Report
103+
# uses: irongut/[email protected]
104+
# with:
105+
# filename: "Cobertura.xml"
106+
# badge: true
107+
# fail_below_min: false # just informative for now
108+
# format: markdown
109+
# hide_branch_rate: false
110+
# hide_complexity: false
111+
# indicators: true
112+
# output: both
113+
# thresholds: "10 30"
114114

115-
- name: Generate list using Markdown
116-
run: |
117-
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
115+
# - name: Generate list using Markdown
116+
# run: |
117+
# cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
118118

119119
- name: Upload Test Result
120120
uses: actions/upload-artifact@v4
@@ -125,8 +125,8 @@ jobs:
125125
# Use always() to always run this step to publish test results when there are test failures
126126
if: ${{ always() }}
127127

128-
- name: Cleanup Test Results
129-
run: rm -rf ./*Tests/**/TestResults
128+
# - name: Cleanup Test Results
129+
# run: rm -rf ./*Tests/**/TestResults
130130

131131
- name: Publish Blazor Project
132132
run: dotnet publish ./Web/Web.csproj -c:Release -p:GHPages=true --no-restore -o dist/Web --nologo

0 commit comments

Comments
 (0)