Skip to content

Commit

Permalink
Setup code coverage in Azure DevOps
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleejordan committed Oct 22, 2021
1 parent d2038fe commit 196ad40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .vsts-ci/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ jobs:
vmImage: windows-2019
steps:
- template: templates/ci-general.yml
- template: templates/coverage.yml

- job: PS7_macOS
displayName: PowerShell 7 - macOS 10.15
pool:
vmImage: macOS-10.15
steps:
- template: templates/ci-general.yml
- template: templates/coverage.yml

- job: PS7_Ubuntu
displayName: PowerShell 7 - Ubuntu 20.04
Expand Down
11 changes: 11 additions & 0 deletions .vsts-ci/templates/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NOTE: This requires the build to have been run first.
steps:
- pwsh: npm run coverage
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
displayName: Analyzing code coverage
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage results
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/vscode-powershell/coverage/cobertura-coverage.xml
failIfCoverageEmpty: true

0 comments on commit 196ad40

Please sign in to comment.