Skip to content

Commit

Permalink
Upload coverage report to codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Nov 17, 2019
1 parent 6eb15a3 commit c4a11db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Codecov" version="1.8.0" />
<package id="Codecov" version="1.9.0" />
<package id="OpenCover" version="4.6.519" />
<package id="ReportGenerator" version="2.3.5.0" targetFramework="net452" />
<package id="xunit.runner.console" version="2.4.1" />
Expand Down
11 changes: 11 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ jobs:
testResultsFormat: xUnit
testResultsFiles: 'build/*.xml'

- task: PowerShell@2
displayName: Upload coverage reports to codecov.io
condition: eq(variables['BuildConfiguration'], 'Debug')
inputs:
workingDirectory: '$(Build.SourcesDirectory)/build'
script: |
$packageConfig = [xml](Get-Content ..\.nuget\packages.config)
$codecov_version = $packageConfig.SelectSingleNode('/packages/package[@id="Codecov"]').version
$codecov = "..\packages\Codecov.$codecov_version\tools\codecov.exe"
&$codecov -f '..\build\OpenCover.Reports\OpenCover.StyleCopAnalyzers.xml'
- task: PublishBuildArtifacts@1
displayName: Publish build logs
inputs:
Expand Down

0 comments on commit c4a11db

Please sign in to comment.