-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
45 lines (42 loc) · 2.27 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
image: Visual Studio 2019
version: 1.0.{build}
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
before_build:
- cmd: nuget restore
environment:
CODECOV_REPO_TOKEN:
secure: 2z0PTX/jf8wA5zyNxr1ToPNJMrXpV4B3doSIvARWaT7cQ/TcHH9z1kK8VCWi+xf+
configuration:
- Release
test_script:
- ps: |
dotnet test --configuration Release --filter=TestCategory!=ApiTests /p:CollectCoverage=true /p:Exclude='\"[*TestAdapter*]*,[*]*.Startup*,[*]*.Program,[*.Test*]*,[nunit*]*\"' /p:ExcludeByAttribute='\"Obsolete,GeneratedCode,CompilerGeneratedAttribute\"' /p:CoverletOutputFormat=cobertura /p:CoverletOutput=../coverage/MongoDB.ApplicationInsights.coverage.cobertura.xml /p:Threshold=90 /p:ThresholdType=branch MongoDB.ApplicationInsights.Test/MongoDB.ApplicationInsights.Test.csproj
dotnet test --configuration Release --filter=TestCategory!=ApiTests /p:CollectCoverage=true /p:Exclude='\"[*TestAdapter*]*,[*]*.Startup*,[*]*.Program,[*.Test*]*,[nunit*]*,[MongoDB.ApplicationInsights]*\"' /p:ExcludeByAttribute='\"Obsolete,GeneratedCode,CompilerGeneratedAttribute\"' /p:CoverletOutputFormat=cobertura /p:CoverletOutput=../coverage/MongoDB.ApplicationInsights.DependencyInjection.coverage.cobertura.xml /p:Threshold=90 /p:ThresholdType=branch MongoDB.ApplicationInsights.DependencyInjection.Test/MongoDB.ApplicationInsights.DependencyInjection.Test.csproj
after_test:
- ps: |
$env:PATH = 'C:\Program Files\git\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f '"coverage/*.xml"' -t $env:CODECOV_REPO_TOKEN
echo ("for some reason printing the last exit code makes appveyor think this step succeeded " + $lastExitCode)
for:
-
branches:
only:
- master
build:
publish_nuget: true
deploy:
provider: NuGet
api_key:
secure: 73ttnHBwugNOwKHU0rzSnvQnhH13kusweIHj4tRAwRzpcALLLz/Xtyr+neooO5NO
# secure: lo9gC4NDoECBxAzgZZMFKklAQGmyL7VOIfMzPqRB1InlB4D5g4A+tSGUITR2pS6i
skip_symbols: false
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))