Skip to content

Commit a5cdd18

Browse files
authored
Fix pipeline deprecation warnings (#651)
Upgrade PublishCodeCoverageResults@2
1 parent 8a597b5 commit a5cdd18

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

azure-pipelines.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

ci/compare-codecov.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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]
7273
if (Test-Path -Path $coveragePath) {
7374
[xml]$BranchXML = Get-Content $coveragePath
7475
}

0 commit comments

Comments
 (0)