Skip to content

Commit f42034e

Browse files
committed
Fix Azure Pipelines code coverage (issue dsccommunity#236)
1 parent ae40156 commit f42034e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
1818
- Added a CONTRIBUTING.md.
1919
- Replaced module CommonResourceHelper with the PowerShell Gallery module
2020
DscResource.Common v0.2.0.
21+
- Adding back publishing code coverage to Codecov.io.
22+
- Add stats badge for Codecov.io in README.md.
23+
- Fix Azure Pipelines code coverage ([issue #236](https://github.com/dsccommunity/xFailOverCluster/issues/236)).
2124

2225
### Changed
2326

@@ -63,8 +66,6 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
6366
DscResource.Test cannot be imported.
6467
- Update the deploy stage so that it is skipped when merging
6568
branch master in forks.
66-
- Adding back publishing code coverage to Codecov.io.
67-
- Add stats badge for Codecov.io in README.md.
6869
- xClusterPreferredOwner
6970
- Fixed broken links to examples in README.md.
7071
- xClusterQuorum

azure-pipelines.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,6 @@ stages:
105105
testResultsFormat: 'NUnit'
106106
testResultsFiles: 'output/testResults/NUnit*.xml'
107107
testRunTitle: 'Unit (Windows Server Core)'
108-
- task: PublishCodeCoverageResults@1
109-
displayName: 'Publish Code Coverage'
110-
condition: succeededOrFailed()
111-
inputs:
112-
codeCoverageTool: 'JaCoCo'
113-
summaryFileLocation: 'output/testResults/CodeCov*.xml'
114-
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'
115108
- task: PublishBuildArtifacts@1
116109
displayName: 'Publish Test Artifact'
117110
inputs:
@@ -168,6 +161,13 @@ stages:
168161
downloadType: 'single'
169162
artifactName: 'testResults'
170163
downloadPath: '$(Build.SourcesDirectory)/output'
164+
- task: PublishCodeCoverageResults@1
165+
displayName: 'Publish Code Coverage'
166+
condition: succeededOrFailed()
167+
inputs:
168+
codeCoverageTool: 'JaCoCo'
169+
summaryFileLocation: 'output/testResults/JaCoCo_coverage.xml'
170+
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'
171171
- script: |
172172
bash <(curl -s https://codecov.io/bash) -f "./output/testResults/JaCoCo_coverage.xml"
173173
displayName: 'Upload to Codecov.io'

0 commit comments

Comments
 (0)