-
Notifications
You must be signed in to change notification settings - Fork 29
/
appveyor.yml
61 lines (44 loc) · 1.65 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
version: 1.0.0.{build}
image: Visual Studio 2019
configuration:
- Debug
- Release
platform: Any CPU
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
EnableNuGetPackageRestore: true
services: mssql2017
build:
project: ./Source/Blog/Blog.sln
parallel: true
verbosity: detailed
before_test:
- ps: >-
$server = "(local)\SQL2017"
$database = "AdventureWorks"
# Replace the db connection with the local instance.
$configPath = "$($env:appveyor_build_folder)\Source\Blog\Dixin.Tests\bin\$($env:CONFIGURATION)\Dixin.Net.Tests.dll.config"
$config = (gc $configPath) -as [xml]
$config.SelectSingleNode('//connectionStrings/add[@name="AdventureWorks"]').connectionString = "Server=$server; Database=$database; Trusted_connection=true"
$config.Save($configPath)
# Attach mdf to local instance.
$databaseDirectory = "$($env:appveyor_build_folder)\Source\Blog\Data"
$mdfPath = join-path $databaseDirectory "AdventureWorks_Data.mdf"
$ldfPath = join-path $databaseDirectory "AdventureWorks_Log.ldf"
sqlcmd -S "$server" -Q "Use [master]; CREATE DATABASE [$database] ON (FILENAME = '$mdfPath'),(FILENAME = '$ldfPath') FOR ATTACH"
sqlcmd -S "$server" -Q "Use [$database]; EXEC sys.sp_configure @configname = N'clr enabled', @configvalue = 1;"
sqlcmd -S "$server" -Q "Use [$database]; RECONFIGURE;"
Start-Service MSDTC
notifications:
- provider: Email
to:
subject: AppVeyar Blog
on_build_success: true
on_build_failure: true
on_build_status_changed: true