forked from jstedfast/MimeKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coveralls.ps1
28 lines (24 loc) · 1.12 KB
/
coveralls.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
25
26
27
28
$NUnitConsoleRunner = Join-Path $Home ".nuget\packages\nunit.consolerunner\3.12.0\tools\nunit3-console.exe"
$Coveralls = Join-Path $Home ".nuget\packages\coveralls.net\0.7.0\tools\csmacnz.Coveralls.exe"
$OpenCoverDir = Join-Path $Home ".nuget\packages\opencover\4.6.519\tools"
$OpenCoverProfiler32 = Join-Path $OpenCoverDir "x86\OpenCover.Profiler.dll"
$OpenCoverProfiler64 = Join-Path $OpenCoverDir "x64\OpenCover.Profiler.dll"
$OpenCover = Join-Path $OpenCoverDir "OpenCover.Console.exe"
$OutputDir = "UnitTests\bin\Debug\net48"
& regsvr32 $OpenCoverProfiler32
& regsvr32 $OpenCoverProfiler64
& $OpenCover -filter:"+[MimeKit]* -[UnitTests]*" `
-target:"$NUnitConsoleRunner" `
-targetdir:"$OutputDir" `
-targetargs:"--domain:single UnitTests.dll" `
-output:opencover.xml
& $Coveralls --opencover -i opencover.xml `
--repoToken $env:COVERALLS_REPO_TOKEN `
--useRelativePaths `
--basePath $OutputDir `
--commitId $env:GIT_COMMIT_SHA `
--commitBranch $env:GIT_REF.Replace('refs/heads/', '') `
--commitAuthor $env:GIT_ACTOR `
--commitEmail $env:GIT_ACTOR_EMAIL `
--commitMessage $env:GIT_COMMIT_MESSAGE `
--jobId $env:COVERALLS_JOB_ID