Skip to content

Commit

Permalink
Migrate .NET Core PostgreSQL Windows tests from AppVeyor to GitHub Ac…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
hazzik committed Jun 9, 2024
1 parent e8028fb commit 97527c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/NetCoreTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ jobs:
CONNECTION_STRING: "Host=localhost;Username=nhibernate;Password=nhibernate;Database=nhibernate;Enlist=true;"
OS: ubuntu-latest
DB_INIT: |
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
- DB: PostgreSQL
CONNECTION_STRING: "Host=localhost;Username=postgres;Password=nhibernate;Database=nhibernate;Enlist=true;"
OS: windows-latest
DB_INIT: |
choco install postgresql13 --no-progress --params '/Password:nhibernate'
Add-Content -Path 'C:\Program Files\PostgreSQL\13\data\postgresql.conf' -Value "`r`nmax_prepared_transactions = 100"
Start-Service 'postgresql-x64-13'
- DB: Firebird
CONNECTION_STRING: "DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
OS: ubuntu-latest
Expand Down Expand Up @@ -55,12 +62,17 @@ jobs:
steps:
- name: Set up ${{matrix.DB}}
run: ${{matrix.DB_INIT}}
- uses: actions/checkout@v4
- name: Setup .NET

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false

- name: Build and Test
run: |
pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{'Database' = '${{matrix.DB}}';'ConnectionString'='${{matrix.CONNECTION_STRING}}'}"
7 changes: 0 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ environment:
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: PostgreSQL
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
- DB: Firebird
- DB: Firebird4
- DB: MySQL
Expand Down Expand Up @@ -68,11 +66,6 @@ before_test:
& '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' }
'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' }
'SqlServer2008-MicrosoftDataSqlClientDriver' { Start-Service 'MSSQL$SQL2017' }
'SqlServer2012' { Start-Service 'MSSQL$SQL2017' }
Expand Down

0 comments on commit 97527c0

Please sign in to comment.