Skip to content

Commit 196ad40

Browse files
committed
Setup code coverage in Azure DevOps
1 parent d2038fe commit 196ad40

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.vsts-ci/azure-pipelines-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ jobs:
4646
vmImage: windows-2019
4747
steps:
4848
- template: templates/ci-general.yml
49+
- template: templates/coverage.yml
4950

5051
- job: PS7_macOS
5152
displayName: PowerShell 7 - macOS 10.15
5253
pool:
5354
vmImage: macOS-10.15
5455
steps:
5556
- template: templates/ci-general.yml
57+
- template: templates/coverage.yml
5658

5759
- job: PS7_Ubuntu
5860
displayName: PowerShell 7 - Ubuntu 20.04

.vsts-ci/templates/coverage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# NOTE: This requires the build to have been run first.
2+
steps:
3+
- pwsh: npm run coverage
4+
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
5+
displayName: Analyzing code coverage
6+
- task: PublishCodeCoverageResults@1
7+
displayName: Publish code coverage results
8+
inputs:
9+
codeCoverageTool: Cobertura
10+
summaryFileLocation: $(Build.SourcesDirectory)/vscode-powershell/coverage/cobertura-coverage.xml
11+
failIfCoverageEmpty: true

0 commit comments

Comments
 (0)