Skip to content

Commit b312a53

Browse files
authored
Allow generation of HTML Code Coverage reports
Currently when running this pipeline a message ##[warning]Please install dotnet core to enable automatic generation of Html report. is displayed under code coverage. This fix adds an addiitonal task to install .Net Core SDK as well as set the environment variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT to 1 for the publish coverage report task. A new warning will now be shown- ##[warning]Ignoring coverage report directory with Html content as we are auto-generating Html content However now if you view the code coverage report it is HTML generated and looks a lot better than before
1 parent 98a610f commit b312a53

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.pipelines/code-quality-template.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ steps:
1717
failTaskOnFailedTests: true
1818
displayName: 'Publish test results'
1919

20+
- task: UseDotNet@2
21+
displayName: 'Install .NET Core SDK'
22+
inputs:
23+
version: 3.1.x
24+
performMultiLevelLookup: true
25+
2026
- task: PublishCodeCoverageResults@1
2127
displayName: 'Publish coverage report'
2228
condition: succeededOrFailed()
29+
env:
30+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: '1'
2331
inputs:
2432
codeCoverageTool: Cobertura
2533
summaryFileLocation: 'coverage.xml'

0 commit comments

Comments
 (0)