File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,11 +81,10 @@ stages:
8181 testResultsFiles : ' **/test-*.xml'
8282 testRunTitle : ' Publish test results for Python $(python.version)'
8383
84- - task : PublishCodeCoverageResults@1
84+ - task : PublishCodeCoverageResults@2
8585 displayName : ' Publish code coverage report'
8686 condition : succeededOrFailed()
8787 inputs :
88- codeCoverageTool : Cobertura
8988 summaryFileLocation : ' $(System.DefaultWorkingDirectory)/coverage.xml'
9089
9190
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ foreach ($cov in $mainCoverageJson.coverageData.coverageStats) {
6868
6969
7070# Get current code coverage from coverage.xml file.
71- $coveragePath = Get-ChildItem - Recurse - Filter " coverage.xml" $wd
71+ # Use the first one, if there are multiple i.e. from multiple runs.
72+ $coveragePath = (Get-ChildItem - Recurse - Filter " coverage.xml" $wd )[0 ]
7273if (Test-Path - Path $coveragePath ) {
7374 [xml ]$BranchXML = Get-Content $coveragePath
7475}
You can’t perform that action at this time.
0 commit comments