forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (48 loc) · 2.31 KB
/
.travis.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
os: linux
dist: xenial
language: csharp
mono: none
dotnet: 2.1.300
services:
- mysql
- postgresql
- docker
env:
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
- DB=PostgreSQL CONNECTION_STRING="Host=localhost;Port=5432;Username=postgres;Database=nhibernate;Enlist=true;"
- DB=Firebird
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
- DB=SQLite
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y powershell
- |-
if [[ "$DB" == "MySQL" ]]
then
echo -e '[server]\nlower_case_table_names=1\n[mysqld]\ncharacter-set-server=utf8\ncollation-server=utf8_general_ci' | sudo tee -a /etc/mysql/my.cnf
sudo service mysql restart
fi
- |-
if [[ "$DB" == "Firebird" ]]
then
sudo apt-get install -y libtommath-dev
# This would be required on bionic and above
# sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
wget -q https://github.com/FirebirdSQL/firebird/releases/download/R3_0_5/Firebird-3.0.5.33220-0.amd64.tar.gz
tar xzvf Firebird-3.0.5.33220-0.amd64.tar.gz
pushd Firebird-3.0.5.33220-0.amd64
sudo ./install.sh -silent
popd
export $(sudo cat /opt/firebird/SYSDBA.password | grep -v ^# | xargs)
sudo chmod 775 /tmp/firebird
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
sudo systemctl restart firebird-superserver
fi
before_script:
- if [[ "$DB" == "SqlServer2008" ]]; then docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress microsoft/mssql-server-linux:latest; fi
- if [[ "$DB" == "PostgreSQL" ]]; then psql -c "CREATE DATABASE nhibernate;" -U postgres; fi
- if [[ "$DB" == "MySQL" ]]; then mysql -e "CREATE DATABASE IF NOT EXISTS nhibernate;"; fi
script:
- pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"$DB\";\"ConnectionString\"=\"$CONNECTION_STRING\"}"