-
Notifications
You must be signed in to change notification settings - Fork 11
/
appveyor.yml
81 lines (66 loc) · 2.91 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: 'v$(package_version).{build}-{branch}'
skip_tags: true
image: Visual Studio 2017
environment:
package_version: '0.9.0'
COVERALLS_REPO_TOKEN:
secure: o3Oj2doUP9AbvI5Phn28o+JHMk9W9P39yiyq1b3d96g0FoJ1loUm7PJ7GytUzxyO
git_access_token:
secure: kFNrVQrkAApceG8qiKcsgXAFx50qkY4Lfl2OLczSxwhEYbHh78AdPqyBn3P/JEjo
git_email: nzsmartie@gmail.com
git_user: NZSmartie
before_build:
- cmd: nuget restore
for:
- branches:
except:
- docs
skip_commits:
files:
- docs/**/*
- /*.md
- /*.yml
# Patch package version to all match
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '$(package_version).$(APPVEYOR_BUILD_NUMBER)'
package_version: '$(package_version)-pre$(APPVEYOR_BUILD_NUMBER)'
build:
publish_nuget: true
publish_nuget_symbols: true
verbosity: minimal
test_script:
- ps: |
& msbuild /t:restore /p:Configuration=AppVeyor
& $env:USERPROFILE\.nuget\packages\opencover\4.6.519\tools\OpenCover.Console.exe -oldstyle -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test tests/CoAPNet.Tests -c AppVeyor --verbosity quiet --logger:trx" -filter:"+[CoAPNet*]* -[*.Tests]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -excludebyfile:*\*Designer.cs -hideskipped:All -output:".\CoAPNet.coverage.xml"
& $env:USERPROFILE\.nuget\packages\opencover\4.6.519\tools\OpenCover.Console.exe -oldstyle -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test tests/CoAPNet.Udp.Tests -c AppVeyor --verbosity quiet --logger:trx" -filter:"+[CoAPNet*]* -[*.Tests]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -excludebyfile:*\*Designer.cs -hideskipped:All -output:".\CoAPNet.Udp.coverage.xml"
& $env:USERPROFILE\.nuget\packages\coveralls.io\1.3.4\tools\coveralls.net.exe --opencover CoAPNet.coverage.xml
& $env:USERPROFILE\.nuget\packages\coveralls.io\1.3.4\tools\coveralls.net.exe --opencover CoAPNet.Udp.coverage.xml
# upload results to AppVeyor
$testsResults = Resolve-Path tests\CoAPNet.Tests\TestResults\*.trx;
Write-Host "Uploading test results" -ForegroundColor Green
Write-Host "$testsResults"
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", $testsResults)
artifacts:
- path: '**/coverage.xml'
name: Code Coverage
- path: '**/*.trx'
name: Unit Test Results
# Deploy to MyGet
deploy:
- provider: NuGet
server: https://www.myget.org/F/coapnet/api/v2/package
api_key:
secure: gXj5iu2gWjqUfY5EbDi7pG7w6x3CNtWpG5p4Qy4KuWZ1rVXAzmVWXz6MIrmAUDeA
symbol_server: https://www.myget.org/F/coapnet/symbols/api/v2/package
- branches:
only:
- docs
build_script:
- ps: |
Push-Location ./docs
./build.ps1 -Deploy
Pop-Location
test: off