@@ -10,6 +10,8 @@ skip_tags: true
10
10
clone_folder : C:\projects\libgit2sharp
11
11
12
12
environment :
13
+ coveralls_token :
14
+ secure : ixIsBslo9NheDb5lJknF58EYdgvZ0r3/L0ecRiXjfXmjHBLvoSU6/ZRwaMM+BAlG
13
15
coverity_token :
14
16
secure : nuzUT+HecXGIi3KaPd/1hgFEZJan/j6+oNbPV75JKjk=
15
17
coverity_email :
@@ -66,6 +68,8 @@ install:
66
68
If ($Env:SHOULD_PACKAGE_NUGET_ARTIFACT -eq $True)
67
69
{
68
70
cinst sourcelink -y
71
+ nuget install OpenCover -Version 4.5.3723 -ExcludeVersion -OutputDirectory .\packages
72
+ nuget install coveralls.net -Version 0.5.0 -ExcludeVersion -OutputDirectory .\packages
69
73
}
70
74
71
75
If ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $True)
@@ -98,7 +102,18 @@ test_script:
98
102
- ps : |
99
103
If ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $False)
100
104
{
101
- & "$Env:xunit_runner" "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" /appveyor
105
+ If ($Env:SHOULD_PACKAGE_NUGET_ARTIFACT -eq $True -and $Env:publish_on_success -eq $True)
106
+ {
107
+ .\packages\OpenCover\OpenCover.Console.exe `
108
+ -register:user `
109
+ -target:$Env:xunit_runner `
110
+ "-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll"" /noshadow /appveyor" `
111
+ -filter:"+[LibGit2Sharp*]*" -output:opencoverCoverage.xml
112
+ }
113
+ Else
114
+ {
115
+ & "$Env:xunit_runner" "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" /appveyor
116
+ }
102
117
}
103
118
104
119
after_test :
@@ -120,6 +135,16 @@ after_test:
120
135
Write-Host "LibGit2Sharp version = $([LibGit2Sharp.GlobalSettings]::Version)" -ForegroundColor "Magenta"
121
136
122
137
Get-ChildItem "$Env:APPVEYOR_BUILD_FOLDER\LibGit2sharp\*.nupkg" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
138
+
139
+ .\packages\coveralls.net\csmacnz.Coveralls.exe `
140
+ --opencover -i opencoverCoverage.xml `
141
+ --repoToken $env:COVERALLS_REPO_TOKEN `
142
+ --commitId $env:APPVEYOR_REPO_COMMIT `
143
+ --commitBranch $env:APPVEYOR_REPO_BRANCH `
144
+ --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR `
145
+ --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL `
146
+ --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE `
147
+ --jobId $env:APPVEYOR_JOB_ID
123
148
}
124
149
125
150
If ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $True -and $Env:publish_on_success -eq $True)
0 commit comments