Skip to content

Commit

Permalink
Update PublishCodeCoverateResults task (#5972)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Sep 11, 2024
1 parent 5afc447 commit 62891ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
24 changes: 12 additions & 12 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,13 @@ jobs:
displayName: Generate Code Coverage Data
condition: and(succeededOrFailed(), eq(variables['CODE_COVERAGE'], 'enabled'))
- task: PublishCodeCoverageResults@1
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/**/Cobertura.xml'
displayName: Publish Code Coverage to DevOps
condition: and(succeededOrFailed(), eq(variables['CODE_COVERAGE'], 'enabled'))

- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@8
- task: BuildQualityChecks@9
displayName: Check line coverage
inputs:
checkCoverage: true
Expand All @@ -287,15 +286,16 @@ jobs:
coverageThreshold: ${{ parameters.LineCoverageTarget }}
condition: and(succeededOrFailed(), eq(variables['CODE_COVERAGE'], 'enabled'), eq(variables['Skip.LineCoverageEnforcement'], ''))

- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@8
displayName: Check branch coverage
inputs:
checkCoverage: true
coverageFailOption: fixed
coverageType: branches
# Minimum baseline for branch coverage
coverageThreshold: ${{ parameters.BranchCoverageTarget }}
condition: and(succeededOrFailed(), eq(variables['CODE_COVERAGE'], 'enabled'), eq(variables['Skip.BranchCoverageEnforcement'], ''))
# Disabling branch coverage check until newer tasks can support it see issue https://github.com/microsoft/azure-pipelines-tasks/issues/19669 tracking that request.
# - task: BuildQualityChecks@9
# displayName: Check branch coverage
# inputs:
# checkCoverage: true
# coverageFailOption: fixed
# coverageType: branches
# # Minimum baseline for branch coverage
# coverageThreshold: ${{ parameters.BranchCoverageTarget }}
# condition: and(succeededOrFailed(), eq(variables['CODE_COVERAGE'], 'enabled'), eq(variables['Skip.BranchCoverageEnforcement'], ''))

- task: Powershell@2
inputs:
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,8 @@ jobs:
displayName: Generate Code Coverage Data
condition: and(succeeded(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], ''))
- task: PublishCodeCoverageResults@1
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/**/Cobertura.xml'
displayName: Publish Code Coverage to DevOps
condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], ''))
Expand Down

0 comments on commit 62891ee

Please sign in to comment.