Skip to content

Commit

Permalink
Merge pull request #1308 from johlju/fix/pipeline
Browse files Browse the repository at this point in the history
SharePointDsc: Fix code coverage in pipeline
  • Loading branch information
ykuijs authored Apr 9, 2021
2 parents f0c242c + 3ba5b33 commit 3af354e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added

- SPUsageDefinition
- New resource

### Fixed

- SharePointDsc
- Fixed code coverage in pipeline.

## [4.6.0] - 2021-04-02

### Added
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,21 +224,21 @@ stages:
inputs:
buildType: 'current'
artifactName: 'CodeCoverage_2013'
targetPath: '$(Build.SourcesDirectory)/output/CodeCov2013'
targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)/CodeCov2013'

- task: DownloadPipelineArtifact@2
displayName: 'Download Test Artifact'
inputs:
buildType: 'current'
artifactName: 'CodeCoverage_2016'
targetPath: '$(Build.SourcesDirectory)/output/CodeCov2016'
targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)/CodeCov2016'

- task: DownloadPipelineArtifact@2
displayName: 'Download Test Artifact'
inputs:
buildType: 'current'
artifactName: 'CodeCoverage_2019'
targetPath: '$(Build.SourcesDirectory)/output/CodeCov2019'
targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)/CodeCov2019'

- task: PowerShell@2
name: merge
Expand All @@ -253,8 +253,8 @@ stages:
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: '$(Build.SourcesDirectory)/output/CodeCov_Merged.xml'
pathToSources: '$(Build.SourcesDirectory)/$(buildFolderName)/$(dscBuildVariable.RepositoryName)'
summaryFileLocation: '$(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)/CodeCov_Merged.xml'
pathToSources: '$(Build.SourcesDirectory)/$(dscBuildVariable.RepositoryName)/'

- script: |
bash <(curl -s https://codecov.io/bash) -f "./$(buildFolderName)/CodeCov_Merged.xml" -F unit
Expand Down
5 changes: 4 additions & 1 deletion build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ Pester:
CodeCoverageThreshold: 75 # Set to 0 to bypass
CodeCoverageOutputFile: CodeCoverage.xml
CodeCoverageOutputFileEncoding: ascii
# CodeCoverageMergedOutputFile: JaCoCo_Merged.xml

CodeCoverage:
CodeCoverageMergedOutputFile: CodeCov_Merged.xml
CodeCoverageFilePattern: Codecov*.xml

DscTest:
ExcludeTag:
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ coverage:
threshold: 5

fixes:
- '\d+\.\d+\.\d+\/::source/' # move path "X.Y.Z/" => "source/"
- '^\d+\.\d+\.\d+::SharePointDsc' # move path "X.Y.Z/" => "SharePointDsc"

0 comments on commit 3af354e

Please sign in to comment.