forked from Dixin/EntityFramework.Functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
62 lines (47 loc) · 1.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
version: 1.3.1.{build}
configuration:
- Debug
- Release
platform: Any CPU
init:
- ps:
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
EnableNuGetPackageRestore: true
services: mssql2014
install:
- ps:
before_build:
- cmd: nuget restore -verbosity detailed
build:
project: Tools\EntityFramework.Functions.appveyor.sln
verbosity: detailed
before_test:
- ps: >-
$server = "(local)\SQL2014"
$database = "AdventureWorks"
# Replace the db connection with the local instance.
$configPath = "$($env:appveyor_build_folder)\EntityFramework.Functions.Tests\bin\$($env:CONFIGURATION)\EntityFramework.Functions.Tests.dll.config"
$config = (gc $configPath) -as [xml]
$config.SelectSingleNode('//connectionStrings/add[@name="EntityFramework.Functions.Tests.Properties.Settings.AdventureWorksConnectionString"]').connectionString = "Server=$server; Database=$database; Trusted_connection=true"
$config.Save($configPath)
# Attach mdf to local instance.
$databaseDirectory = "$($env:appveyor_build_folder)\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;"
notifications:
- provider: Email
to:
- dixinyan@live.com
subject: AppVeyar EntityFramework.Functions
on_build_success: true
on_build_failure: true
on_build_status_changed: true