-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
130 lines (86 loc) · 4.54 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
# fetch repository as zip archive
shallow_clone: false # default is "false"
# build cache to preserve files/folders between builds
cache:
- WebSite\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
#- WebSite\node_modules # local npm modules
#- '%APPDATA%\npm-cache' # npm cache
#- WebSite\bower_components # bower components
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
environment:
COVERALLS_REPO_TOKEN:
secure: oPWlAm7qUsd8UDn+sKevbeqai8QfEDr5CdBFgL5aFSuRJdDzAz226rL6oIsHEDev
os: Visual Studio 2015
services:
- mssql2008r2sp2 # start sql server 2008
- iis # start IIS
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node 4.2.4
# install modules
# Install Gulp
- ps: .\Setup.ps1
before_build:
- nuget restore WebSite\WebTool.sln
# to add several configurations to build matrix:
#configuration:
# - Debug
# - Release
build:
parallel: true # enable MSBuild parallel builds
project: WebSite\WebTool.sln # path to Visual Studio solution or project
publish_wap: true
# scripts to run after build
after_build:
# Attach the Database
- ps: .\appveyor-attachdb-sql.ps1
# Create the iis website
- ps: .\CreateIISWebSite.ps1
# Enable SQL Server name pipe and TCP-IP
- ps: .\sql-server-ip-and-alias.ps1
# Test The Database
- sqlcmd -S "(local)\SQL2008R2SP2" -U "sa" -P "Password12!" -Q "SELECT * FROM information_schema.tables;" -d "master"
- sqlcmd -S "(local)\SQL2008R2SP2" -U "sa" -P "Password12!" -Q "SELECT * FROM dbo.Users;" -d "WebTool"
# Test IIS
- C:\Users\appveyor\AppData\Roaming\npm\node_modules\phantomjs\lib\phantom\bin\phantomjs.exe WebSite\Test\BDD\phantomjs_Debug.js
# Run Jasmine
- karma start "WebSite\Test\Jasmine\webTool.conf.js"
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
# run tests
- ps: nunit-console.exe ".\WebSite\Test\BDD\bin\$env:CONFIGURATION\BDD.dll"
# run unit tests
- ps: .\WebSite\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user -target:.\WebSite\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe "-targetargs:"".\WebSite\Test\WebToolService.Test\bin\$env:CONFIGURATION\WebToolService.Test.dll" ".\WebSite\Test\Utilities.Test\bin\$env:CONFIGURATION\Utilities.Test.dll" ".\WebSite\Test\WebTool.Test\bin\$env:CONFIGURATION\WebTool.Test.dll"" /noshadow /nologo" -returntargetcode -filter:"+[WebToolService|Utilities|WebTool]*" -output:opencoverCoverage.xml
- ps: $env:COVERALLS_REPO_TOKEN
- ps: $env:APPVEYOR_REPO_COMMIT
- ps: $env:APPVEYOR_REPO_BRANCH
- ps: $env:APPVEYOR_REPO_COMMIT_AUTHOR
- ps: $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
- ps: $env:APPVEYOR_REPO_COMMIT_MESSAGE
# upload results to AppVeyor
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))
- ps: $env:APPVEYOR_BUILD_NUMBER
# upload coverage to Coveralls.net
- ps: .\WebSite\packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe --opencover -i opencoverCoverage.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_BUILD_NUMBER --serviceName appveyor
#---------------------------------#
# deployment configuration #
#---------------------------------#
# providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
# provider names are case-sensitive!
deploy:
# Deploying to a named environment
- provider: Environment
name: leoli.noip.me
on:
branch: master
# on successful build
# clear github badge cache
on_success:
- curl -X PURGE https://camo.githubusercontent.com/b5a05a66dcd05757f3624da408ea0e5a243cc4f5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6771793131372f576562546f6f6c2f62616467652e7376673f6272616e63683d6d61737465722631
# on build failure
on_failure:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))