-
Notifications
You must be signed in to change notification settings - Fork 934
.NET Core 2.0 and .NET Standard 2.0 support #1523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c4eb575
Split huge methods in smaller chunks
hazzik 90a6d1a
Add .NET Core 2.0 and .NET Standard 2.0 builds
hazzik 75f4216
Install NUnitLite to run .NET Core tests
hazzik 3c6cd76
Add AppVeyor build configuration
hazzik d9df26a
Add Travis CI build configuration
hazzik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
language: csharp | ||
mono: none | ||
dotnet: 2.1.2 | ||
sudo: required | ||
services: | ||
- mysql | ||
- postgresql | ||
- docker | ||
env: | ||
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;" | ||
- 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;" | ||
matrix: | ||
allow_failures: | ||
- env: DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;" | ||
before_install: | ||
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | ||
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -y powershell | ||
- |- | ||
if [[ "$DB" == "MySQL" ]] | ||
then | ||
echo -e '[server]\nlower_case_table_names=1' | sudo tee -a /etc/mysql/my.cnf | ||
sudo service mysql restart | ||
fi | ||
- |- | ||
if [[ "$DB" == "Firebird" ]] | ||
then | ||
sudo apt-get install -y libicu-dev libtommath-dev curl | ||
curl -L -O https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.amd64.tar.gz | ||
tar xzvf Firebird-3.0.3.32900-0.amd64.tar.gz | ||
pushd Firebird-3.0.3.32900-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 service firebird restart | ||
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\"}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
version: 5.1.0.{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 | ||
fredericDelaporte marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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%\"}" | ||
fredericDelaporte marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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)", $_) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
param ( | ||
$TaskList = 'Default', | ||
[hashtable]$Properties = @{} | ||
) | ||
|
||
Install-Module psake -Force -Scope CurrentUser | ||
Import-Module psake | ||
Invoke-psake -buildFile .\psake.ps1 -nologo -taskList $TaskList -properties $Properties | ||
exit ( [int] ( -not $psake.build_success ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.