Skip to content

Commit

Permalink
Use PublishCodeCoverageResults@2
Browse files Browse the repository at this point in the history
  • Loading branch information
RussKie committed Jun 28, 2023
1 parent 6d67b41 commit eafdcaa
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions eng/pipelines/templates/VerifyCoverageReport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:

steps:
- task: DownloadBuildArtifacts@0
displayName: Download code coverage reports
displayName: Download individual code coverage reports
inputs:
artifactName: CodeCoverageResults
downloadPath: $(System.DefaultWorkingDirectory)
Expand All @@ -15,21 +15,11 @@ steps:
--output ./merged.cobertura.xml
displayName: Merge code coverage reports

- script: $(Build.SourcesDirectory)/.dotnet/dotnet reportgenerator
-reports:./merged.cobertura.xml
-targetdir:./CoverageResultsHtml
-reporttypes:HtmlInline_AzurePipelines
displayName: Generate code coverage report

- task: PublishCodeCoverageResults@1
displayName: Publish coverage report
env:
DISABLE_COVERAGE_AUTOGENERATE: 'true'
- task: PublishCodeCoverageResults@2
displayName: Publish unified code coverage report
inputs:
codeCoverageTool: cobertura
summaryFileLocation: ./merged.cobertura.xml
pathToSources: $(Build.SourcesDirectory)
reportDirectory: ./CoverageResultsHtml

- pwsh: |
$(Build.SourcesDirectory)/eng/scripts/ValidateProjectCoverage.ps1 -CoberturaReportXml ./merged.cobertura.xml
Expand Down

0 comments on commit eafdcaa

Please sign in to comment.