-
Notifications
You must be signed in to change notification settings - Fork 23
/
.appveyor.yml
134 lines (97 loc) · 4.02 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.0.{build}-{branch}
skip_tags: true
# branches to build, in case we want to whitelist or blacklist some
#branches:
# only:
# - /jm_.*/
# We'll probably want to filter branches and also have branch-conditional configs,
# at which point, look here: https://www.appveyor.com/docs/branches/
# skip commits with a commit message matching this regex
# note that [skip ci] and [skip appveyor] should work anyway
#skip_commits:
# message: /\[chore\]/
#---------------------------------#
# environment configuration #
#---------------------------------#
image:
- Visual Studio 2017
# scripts that are called at the very beginning, before repo cloning
init:
- git config --global core.autocrlf true
# Limit the number of revisions in the history and download as .zip file. Technically
# these seem to be mutually exclusive.
shallow_clone: true
clone_depth: 5
nuget:
disable_publish_on_pr: true
environment:
COVERALLS_REPO_TOKEN:
secure: x5HXnLkYkCzK7mWUW6O8QjNAaYNySKhI2Q20oah9i5mvnTk4U8jLJZnVb9MSxx0a
# scripts that run after cloning repository
install:
# by default, all script lines are interpreted as batch
matrix:
fast_finish: true
#---------------------------------#
# build configuration #
#---------------------------------#
configuration:
- release
build:
parallel: true
# MSBuild verbosity level
verbosity: normal
# NOTE : We don't set a custom build script, so by default AppVeyor builds with MSBuild, which is
# fine because that means between this and Travis CI, we're validating dotnet/msbuild and also
# Windows/MacOS/Linux.
before_build:
# Make sure we have the right tools version
- dotnet --version
- dotnet restore
# scripts to run after build
after_build:
#---------------------------------#
# tests configuration #
#---------------------------------#
# Install tools needed for Code Coverage, run instrumented tests, and report coverage numbers
test_script:
- nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
- nuget install coveralls.net -Version 0.8.0-unstable0013 -PreRelease -OutputDirectory tools
# Run the netstandard tests.
# Explicitly build with DebugType=Full specified. This means a non-portable, Windows-style PDB
# will be generated, which OpenCover currently requires. We can stop doing this once OpenCover supports the new
# portable PDB format.
#
# Also use -oldStyle flag which uses an alternate instrumentation hook that is available for .NET Core
# Some comments on this can be found here: https://github.com/OpenCover/opencover/issues/601
- .\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --logger \"trx;LogFileName=dotnetcore_test_results.xml\" .\Keen.Test\Keen.Test.csproj /property:DebugType=Full" -mergeoutput -output:coverage.xml -filter:"+[*]* -[*.Test]* -[Moq*]*" -oldStyle -returntargetcode -register:user
# Upload coverage results
- .\tools\coveralls.net.0.8.0-unstable0013\tools\csmacnz.Coveralls.exe --opencover -i .\coverage.xml
# Upload netstandard test results to appveyor
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\Keen.Test\TestResults\dotnetcore_test_results.xml))
#---------------------------------#
# notifications #
#---------------------------------#
# We should consider adding some notifications, e.g.:
#notifications:
# Email
# - provider: Email
# to:
# - user1@email.com
# - user2@email.com
# subject: 'Build {{status}}' # optional
# message: "{{message}}, {{commitId}}, ..." # optional
# on_build_status_changed: true
# Slack
# - provider: Slack
# incoming_webhook: http://incoming-webhook-url
# ...or using auth token
# - provider: Slack
# auth_token:
# secure: kBl9BlxvRMr9liHmnBs14A==
# channel: development
# template: "{message}, {commitId}, ..."