-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
47 lines (42 loc) · 2.19 KB
/
appveyor.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: 2.0.{build}
image: Visual Studio 2017
configuration: Release
init:
- ps: >-
$env:customnugetversion = if ($env:APPVEYOR_REPO_BRANCH -eq "master") { "$env:APPVEYOR_BUILD_VERSION" } else { "$env:APPVEYOR_BUILD_VERSION-$env:APPVEYOR_REPO_BRANCH" }
Update-AppveyorBuild -Version $env:customnugetversion
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
COVERALLS_REPO_TOKEN:
secure: mBmDL1xg8kZURgi5fKcmG57D70KeMb5LBh3/JA1qhfd8MI7vc6RD5GAWDOnKAPzJ
nuget:
disable_publish_on_pr: true
before_build:
- cmd: nuget restore .\src
build:
project: ./src/HttpWebRequestWrapper.sln
publish_nuget: true
publish_nuget_symbols: true
use_snupkg_format: true
verbosity: minimal
test_script:
- ps: >-
.\src\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"xunit.console.clr4.exe" "-targetargs:""src\HttpWebRequestWrapper.Tests\bin\$env:CONFIGURATION\HttpWebRequestWrapper.Tests.dll"" /noshadow /appveyor" -filter:"+[HttpWebRequestWrapper*]*" -output:opencoverCoverage.xml -returntargetcode
.\src\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"xunit.console.clr4.exe" "-targetargs:""src\HttpWebRequestWrapper.Tests\bin\$env:CONFIGURATION\HttpWebRequestWrapper.Tests.35.dll"" /noshadow /appveyor" -filter:"+[HttpWebRequestWrapper*]*" -output:opencoverCoverage.xml -returntargetcode -mergeoutput
if ($LastExitCode -ne 0){
throw "xUnit failed with code $LastExitCode"
}
$coveralls = (Resolve-Path "src/packages/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString()
& $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
deploy:
- provider: NuGet
api_key:
secure: EzaH5z1dw0Y+smNGhPzz2SO3aSh0812bTZjKqjZcYJ5o63/RH9SzUPSYxlMRQJH8
skip_symbols: true
on:
branch: /(master|develop)/