forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
66 lines (66 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
version: 5.1.2.{build}
image: Visual Studio 2017
environment:
matrix:
- DB: SqlServer2008
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
- DB: PostgreSQL
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
- DB: Firebird
- DB: MySQL
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;
init:
# Required for having windows endlines in sources zip
- git config --global core.autocrlf true
matrix:
allow_failures:
- DB: MySQL
build: off
before_test:
- ps: |-
switch ($env:DB) {
'Firebird' {
$FireBirdPath = 'C:\firebird'
# Install Firebird
New-Item -ItemType Directory -Force $FireBirdPath > $null
Push-Location $FireBirdPath
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0_x64.zip' -OutFile firebird.zip
Unblock-File firebird.zip
7z x firebird.zip
New-Item -ItemType Directory -Force Data
# Declare nhibernate db
Add-Content -Path '.\databases.conf' -Value "`r`nnhibernate = $FireBirdPath\Data\nhibernate.fdb"
# Minimal db settings
Add-Content -Path '.\firebird.conf' -Value "`r`nAuthServer = Srp`r`nAuthClient = Srp`r`nUserManager = Srp`r`nWireCrypt = Enabled"
# Create SYSDBA account
New-Item SYSDBA.sql -Type File
Add-Content -Path '.\SYSDBA.sql' -Value "CREATE USER SYSDBA PASSWORD 'masterkey';`r`nCOMMIT;`r`nQUIT;"
.\isql -user sysdba employee -input SYSDBA.sql
# Start Firebird
.\firebird.exe -a
Pop-Location
}
'MySQL' {
Start-Service 'MySQL57'
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
$env:MYSQL_PWD = 'Password12!'
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate;' --user=root
}
'Odbc' { Start-Service 'MSSQL$SQL2017' }
'PostgreSQL' {
# Enable prepared transactions
Add-Content -Path 'C:\Program Files\PostgreSQL\10\data\postgresql.conf' -Value "`r`nmax_prepared_transactions = 100"
Start-Service 'postgresql-x64-10'
}
'SqlServer2008' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2012' { Start-Service 'MSSQL$SQL2017' }
}
test_script:
- cmd: powershell -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"%DB%\";\"ConnectionString\"=\"%CONNECTION_STRING%\"}"
deploy: off
on_finish:
- ps: |-
$wc = New-Object 'System.Net.WebClient'
Get-Item '*-TestResult.xml' | ForEach-Object {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", $_)
}