-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCoverage.ps1
24 lines (17 loc) · 1.07 KB
/
Coverage.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Get-ChildItem C:\Screenshots\*.png -Recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
$coveralls = (Resolve-Path "JDI.Light/packages/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString()
write-host "======= COVERALLS PATH: " $coveralls " ======="
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) {
& $coveralls --opencover -i opencoverCoverage.xml --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID
}
else {
write-host "======= PULL REQUEST: " $env:APPVEYOR_PULL_REQUEST_NUMBER " ======="
& $coveralls --opencover -i opencoverCoverage.xml --repoToken $env:COVERALLS_REPO_TOKEN
}
$result = $LASTEXITCODE
$codecov = (Resolve-Path "JDI.Light/packages/Codecov.*/tools/codecov.exe").ToString()
write-host "======= CODECOV PATH: " $codecov " ======="
& $codecov -f "opencoverCoverage.xml"
if($result -ne 0){
exit $result
}