-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathappveyor.yml
More file actions
129 lines (95 loc) · 5.31 KB
/
appveyor.yml
File metadata and controls
129 lines (95 loc) · 5.31 KB
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
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 2.1.1.{build}
# branches to build
branches:
# whitelist
only:
- master
image: Visual Studio 2019
#---------------------------------#
# environment configuration #
#---------------------------------#
# environment variables
environment:
package_dir: NuGet_Packages
# enable patching of AssemblyInfo.* files
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
#---------------------------------#
# 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: Release
# wait for an RDP connection before starting the build for troubleshooting purposes
#init:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
build_script:
- cmd: >-
msbuild.exe src\SpecBind.sln /p:Configuration=%CONFIGURATION% /verbosity:normal /maxcpucount
msbuild.exe examples\FullDemo\ContosoUniversity.sln /p:Configuration=%CONFIGURATION% /verbosity:normal /maxcpucount
# scripts to run before build
before_build:
- ps: If (Test-Path "$env:package_dir") { Remove-Item "$env:package_dir" -Recurse -Force -ErrorAction SilentlyContinue }
- nuget restore src\SpecBind.sln
- nuget restore examples\FullDemo\ContosoUniversity.sln
# scripts to run after build
after_build:
- mkdir %PACKAGE_DIR%
- nuget pack src\SpecBind\SpecBind.nuspec -OutputDirectory %PACKAGE_DIR% -BasePath src\SpecBind -Verbosity Detailed -Version %APPVEYOR_BUILD_VERSION% -Symbols -Properties Configuration=Release
- nuget pack src\SpecBind.Plugin\SpecBind.Plugin.nuspec -OutputDirectory %PACKAGE_DIR% -BasePath src\SpecBind.Plugin -Verbosity Detailed -Version %APPVEYOR_BUILD_VERSION% -Properties Configuration=Release -Tool
- nuget pack src\SpecBind.CodedUI\SpecBind.CodedUI.nuspec -OutputDirectory %PACKAGE_DIR% -BasePath src\SpecBind.CodedUI -Verbosity Detailed -Version %APPVEYOR_BUILD_VERSION% -Symbols -Properties Configuration=Release
- nuget pack src\SpecBind.Selenium\SpecBind.Selenium.nuspec -OutputDirectory %PACKAGE_DIR% -BasePath src\SpecBind.Selenium -Verbosity Detailed -Version %APPVEYOR_BUILD_VERSION% -Symbols -Properties Configuration=Release
#---------------------------------#
# tests configuration #
#---------------------------------#
# Don't use built in runner to get coverage at the same time
#test:
# assemblies:
# - src\SpecBind.Tests\bin\$(configuration)\SpecBind.Tests.dll
# - src\SpecBind.Selenium.Tests\bin\$(configuration)\SpecBind.Selenium.Tests.dll
# - src\SpecBind.CodedUI.Tests\bin\$(configuration)\SpecBind.CodedUI.Tests.dll
# - src\SpecBind.CodedUI.IntegrationTests\bin\$(configuration)\SpecBind.CodedUI.IntegrationTests.dll
test_script:
- cmd: >-
net start W3SVC
%windir%\system32\inetsrv\AppCmd.exe add app /site.name:"Default Web Site" /path:/ContosoUniversity /physicalPath:"%APPVEYOR_BUILD_FOLDER%\examples\FullDemo\ContosoUniversity"
icacls "%APPVEYOR_BUILD_FOLDER%\examples\FullDemo\ContosoUniversity\App_Data\School.sdf" /grant "IIS_IUSRS":M
"%UserProfile%\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe" -register:user -target:"vstest.console.exe" -targetargs:"/Settings:.\src\test.runsettings /logger:Appveyor .\src\SpecBind.Tests\bin\%CONFIGURATION%\SpecBind.Tests.dll .\src\SpecBind.Selenium.Tests\bin\%CONFIGURATION%\SpecBind.Selenium.Tests.dll src\SpecBind.CodedUI.Tests\bin\%CONFIGURATION%\SpecBind.CodedUI.Tests.dll src\SpecBind.CodedUI.IntegrationTests\bin\%CONFIGURATION%\SpecBind.CodedUI.IntegrationTests.dll" -filter:"+[SpecBind]* +[SpecBind.Selenium]* +[SpecBind.CodedUI]* -[SpecBind]SpecBind.Properties.* -[SpecBind.Selenium]SpecBind.Selenium.Properties.* -[SpecBind.CodedUI]SpecBind.CodedUI.Properties.*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\SpecBind_coverage.xml -mergebyhash -returntargetcode
IF %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%
pip install codecov
codecov -f "SpecBind_coverage.xml"
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
# pushing all *.nupkg files in directory
- path: 'NuGet_Packages\*.nupkg'
# preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
cache:
- src\packages -> **\packages.config
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy: off
#---------------------------------#
# notifications configuration #
#---------------------------------#
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/deed811789fbedb507a1
on_build_success: true
on_build_failure: true
on_build_status_changed: true
# wait for an RDP connection after the build for troubleshooting purposes
#on_failure:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))