Skip to content

Commit 55490c9

Browse files
authored
Migrate .NET Core PostgreSQL Windows tests from AppVeyor to GitHub Actions (#3562)
1 parent e8028fb commit 55490c9

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/NetCoreTests.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ jobs:
2424
CONNECTION_STRING: "Host=localhost;Username=nhibernate;Password=nhibernate;Database=nhibernate;Enlist=true;"
2525
OS: ubuntu-latest
2626
DB_INIT: |
27-
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
27+
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
28+
- DB: PostgreSQL
29+
CONNECTION_STRING: "Host=localhost;Username=postgres;Password=nhibernate;Database=nhibernate;Enlist=true;"
30+
OS: windows-latest
31+
DB_INIT: |
32+
choco install postgresql13 --no-progress --params '/Password:nhibernate'
33+
Add-Content -Path 'C:\Program Files\PostgreSQL\13\data\postgresql.conf' -Value "`r`nmax_prepared_transactions = 100"
34+
Start-Service 'postgresql-x64-13'
2835
- DB: Firebird
2936
CONNECTION_STRING: "DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
3037
OS: ubuntu-latest
@@ -55,12 +62,17 @@ jobs:
5562
steps:
5663
- name: Set up ${{matrix.DB}}
5764
run: ${{matrix.DB_INIT}}
58-
- uses: actions/checkout@v4
59-
- name: Setup .NET
65+
66+
- name: Set up .NET
6067
uses: actions/setup-dotnet@v4
6168
with:
6269
dotnet-version: 8.0.x
6370

71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
show-progress: false
75+
6476
- name: Build and Test
6577
run: |
6678
pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{'Database' = '${{matrix.DB}}';'ConnectionString'='${{matrix.CONNECTION_STRING}}'}"

appveyor.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ environment:
66
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
77
- DB: SqlServer2008-MicrosoftDataSqlClientDriver
88
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
9-
- DB: PostgreSQL
10-
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
119
- DB: Firebird
1210
- DB: Firebird4
1311
- DB: MySQL
@@ -68,11 +66,6 @@ before_test:
6866
& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
6967
}
7068
'Odbc' { Start-Service 'MSSQL$SQL2017' }
71-
'PostgreSQL' {
72-
# Enable prepared transactions
73-
Add-Content -Path 'C:\Program Files\PostgreSQL\10\data\postgresql.conf' -Value "`r`nmax_prepared_transactions = 100"
74-
Start-Service 'postgresql-x64-10'
75-
}
7669
'SqlServer2008' { Start-Service 'MSSQL$SQL2017' }
7770
'SqlServer2008-MicrosoftDataSqlClientDriver' { Start-Service 'MSSQL$SQL2017' }
7871
'SqlServer2012' { Start-Service 'MSSQL$SQL2017' }

0 commit comments

Comments
 (0)