forked from reubeno/NClap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
86 lines (65 loc) · 2.78 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
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.4.1.{build}-{branch}
# branches to build
branches:
# whitelist
only:
- master
# Do not build on tags (GitHub only)
skip_tags: true
#---------------------------------#
# environment configuration #
#---------------------------------#
# operating system (build VM template)
os: Windows Server 2012
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# set up environment
environment:
COVERALLS_REPO_TOKEN:
secure: F5G6XI+z7nKUA1mmtD1Het6Yq5KltVlXKSTmKf2KrF+hDOyNp09V9Oozs3HuptWx
# build cache to preserve files/folders between builds
cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: Any CPU
# build Configuration, i.e. Debug, Release, etc.
configuration:
- Debug
- Release
# install a few prereqs
install:
- cinst opencover -source https://nuget.org/api/v2/
- cinst coveralls.net -source https://nuget.org/api/v2/
# restore NuGet packages before building
before_build:
- nuget restore src\NClap.sln
# build!
build:
parallel: true # enable MSBuild parallel builds
project: src\NClap.sln # path to Visual Studio solution or project
# MSBuild verbosity level
verbosity: normal
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
- ps: OpenCover.Console.exe -register:user "-target:C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "-targetargs:src\NClap.Tests\bin\$env:CONFIGURATION\NClap.Tests.dll /logger:Appveyor" -skipautoprops "-filter:+[NClap]*" -output:coverage_$env:CONFIGURATION.xml
- ps: csmacnz.Coveralls.exe --opencover -i coverage_$env:CONFIGURATION.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 --useRelativePaths
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
# publish coverage data
- path: coverage_release.xml
name: CodeCoverageData
# publish NuGet packages
- path: 'src\NClap\bin\$(Configuration)\*.nupkg' # find all NuGet packages recursively
name: NuGetPackages