Skip to content

Commit acf10ea

Browse files
authored
Merge pull request #134 from peetw/feature/docker
Remove obsolete dialects and migrate from AppVeyor to GitHub Actions
2 parents 24c7330 + abdb2ff commit acf10ea

File tree

58 files changed

+2487
-2742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2487
-2742
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MSSQL_SA_PASSWORD=Password123
2+
MYSQL_ROOT_PASSWORD=Password123
3+
POSTGRES_PASSWORD=Password123

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: ${{ matrix.DB }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- DB: MsSql2012 (SQL Server 2017)
14+
DB_INIT: |
15+
docker run -d -e ACCEPT_EULA=Y -e MSSQL_PID=Developer -e MSSQL_SA_PASSWORD=P@ssw0rd -p 11433:1433 mcr.microsoft.com/mssql/server:2017-latest
16+
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
17+
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
18+
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
19+
20+
- DB: MsSql2012 (SQL Server 2019)
21+
DB_INIT: |
22+
docker run -d -e ACCEPT_EULA=Y -e MSSQL_PID=Developer -e MSSQL_SA_PASSWORD=P@ssw0rd -p 11433:1433 mcr.microsoft.com/mssql/server:2019-latest
23+
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
24+
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
25+
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
26+
27+
- DB: MsSql2012 (SQL Server 2022)
28+
DB_INIT: |
29+
docker run -d -e ACCEPT_EULA=Y -e MSSQL_PID=Developer -e MSSQL_SA_PASSWORD=P@ssw0rd -p 11433:1433 mcr.microsoft.com/mssql/server:2022-latest
30+
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
31+
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
32+
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
33+
34+
- DB: MySQL57 (MySQL 5.7)
35+
DB_INIT: docker run -d -e MYSQL_ROOT_PASSWORD=nhsp_test -p 13306:3306 -v ./Tests.NHibernate.Spatial.MySQL57/initdb:/docker-entrypoint-initdb.d mysql:5.7-debian
36+
TEST_PROJECT: Tests.NHibernate.Spatial.MySQL57
37+
38+
- DB: PostGis20 (PostgreSQL 12 PostGIS 2.5)
39+
DB_INIT: docker run -d -e POSTGRES_PASSWORD=nhsp_test -p 15432:5432 -v ./Tests.NHibernate.Spatial.PostGis20/initdb:/docker-entrypoint-initdb.d postgis/postgis:12-2.5
40+
TEST_PROJECT: Tests.NHibernate.Spatial.PostGis20
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Set up ${{ matrix.DB }}
47+
run: ${{ matrix.DB_INIT }}
48+
49+
- name: Setup .NET
50+
uses: actions/setup-dotnet@v3
51+
with:
52+
dotnet-version: 6.0.x
53+
54+
- name: Build
55+
run: dotnet build
56+
57+
- name: Test
58+
run: dotnet test --no-build --verbosity normal --logger "trx;LogFileName=${{ matrix.DB }}.trx" --results-directory . ${{ matrix.TEST_PROJECT }}
59+
60+
- name: Publish test results
61+
uses: actions/upload-artifact@v4
62+
if: success() || failure()
63+
with:
64+
name: ${{ matrix.DB }}
65+
path: ${{ matrix.DB }}.trx

0 commit comments

Comments
 (0)