-
Notifications
You must be signed in to change notification settings - Fork 929
/
appveyor.yml
83 lines (83 loc) · 3.83 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
version: '{build}'
image: Visual Studio 2022
environment:
matrix:
- DB: SqlServer2008
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
- DB: SqlServer2008-MicrosoftDataSqlClientDriver
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
- DB: Firebird
- DB: Firebird4
- DB: MySQL
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;SslMode=none;CharSet=utf8;
init:
# Required for having windows endlines in sources zip
- git config --global core.autocrlf true
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_5/Firebird-3.0.5.33220-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
}
'Firebird4' {
$FireBirdPath = 'C:\firebird'
# Install Firebird
New-Item -ItemType Directory -Force $FireBirdPath > $null
Push-Location $FireBirdPath
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/v4.0.2/Firebird-4.0.2.2816-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 'MySQL80'
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
$env:MYSQL_PWD = 'Password12!'
& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
}
'Odbc' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2008' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2008-MicrosoftDataSqlClientDriver' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2012' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2012-MicrosoftDataSqlClientDriver' { Start-Service 'MSSQL$SQL2017' }
'SQLite' { }
}
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)", $_)
}