Skip to content

Commit

Permalink
Only do codecov if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Windos committed Aug 9, 2020
1 parent 6a63dc1 commit 722072d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Azure-Pipelines/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ param(
$Compile,

[switch]
$Test
$Test,

[switch]
$CodeCoverage
)

# Bootstrap step
Expand Down Expand Up @@ -94,7 +97,9 @@ if($Test.IsPresent) {
$res = Invoke-Pester "./Tests" -CodeCoverage $RelevantFiles -PassThru
}

Export-CodeCovIoJson -CodeCoverage $res.CodeCoverage -RepoRoot $pwd -Path coverage.json
if ($CodeCoverage.IsPresent) {
Export-CodeCovIoJson -CodeCoverage $res.CodeCoverage -RepoRoot $pwd -Path coverage.json

Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
}
}
2 changes: 1 addition & 1 deletion Azure-Pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ stages:
displayName: 'Run tests (compiled .psm1)'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Test
script: ./Azure-Pipelines/build.ps1 -Test -CodeCoverage
env:
AgentTemp: $(Agent.TempDirectory)

Expand Down

0 comments on commit 722072d

Please sign in to comment.