-
Notifications
You must be signed in to change notification settings - Fork 54
100 lines (82 loc) · 4.6 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build and test
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.DB }}
runs-on: ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
include:
- DB: MsSql2012 (SQL Server 2017)
DB_INIT: |
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
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
OS: ubuntu-latest
- DB: MsSql2012 (SQL Server 2019)
DB_INIT: |
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
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
OS: ubuntu-latest
- DB: MsSql2012 (SQL Server 2022)
DB_INIT: |
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
until sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -Q "SELECT 1"; do sleep 10; done
sqlcmd -S localhost,11433 -U sa -P P@ssw0rd -i Tests.NHibernate.Spatial.MsSql2012/initdb/nhsp_test.sql
TEST_PROJECT: Tests.NHibernate.Spatial.MsSql2012
OS: ubuntu-latest
- DB: MySQL57 (MySQL 5.7)
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
TEST_PROJECT: Tests.NHibernate.Spatial.MySQL57
OS: ubuntu-latest
- DB: MySQL80 (MySQL 8.0)
DB_INIT: docker run -d -e MYSQL_ROOT_PASSWORD=nhsp_test -p 13307:3306 -v ./Tests.NHibernate.Spatial.MySQL80/initdb:/docker-entrypoint-initdb.d mysql:8.0
TEST_PROJECT: Tests.NHibernate.Spatial.MySQL80
OS: ubuntu-latest
- DB: MySQL80 (MySQL 8.3)
DB_INIT: docker run -d -e MYSQL_ROOT_PASSWORD=nhsp_test -p 13307:3306 -v ./Tests.NHibernate.Spatial.MySQL80/initdb:/docker-entrypoint-initdb.d mysql:8.3
TEST_PROJECT: Tests.NHibernate.Spatial.MySQL80
OS: ubuntu-latest
- DB: PostGis20 (PostGIS 2.5 PostgreSQL 12)
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
TEST_PROJECT: Tests.NHibernate.Spatial.PostGis20
OS: ubuntu-latest
- DB: PostGis30 (PostGIS 3.0 PostgreSQL 12)
DB_INIT: docker run -d -e POSTGRES_PASSWORD=nhsp_test -p 15433:5432 -v ./Tests.NHibernate.Spatial.PostGis30/initdb:/docker-entrypoint-initdb.d postgis/postgis:12-3.0
TEST_PROJECT: Tests.NHibernate.Spatial.PostGis30
OS: ubuntu-latest
- DB: PostGis30 (PostGIS 3.4 PostgreSQL 16)
DB_INIT: docker run -d -e POSTGRES_PASSWORD=nhsp_test -p 15433:5432 -v ./Tests.NHibernate.Spatial.PostGis30/initdb:/docker-entrypoint-initdb.d postgis/postgis:16-3.4
TEST_PROJECT: Tests.NHibernate.Spatial.PostGis30
OS: ubuntu-latest
- DB: SpatiaLite (SpatiaLite 4)
DB_INIT: sudo apt install libsqlite3-mod-spatialite=4.*
TEST_PROJECT: Tests.NHibernate.Spatial.SpatiaLite
OS: ubuntu-20.04
- DB: SpatiaLite (SpatiaLite 5)
DB_INIT: sudo apt install libsqlite3-mod-spatialite=5.*
TEST_PROJECT: Tests.NHibernate.Spatial.SpatiaLite
OS: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up ${{ matrix.DB }}
run: ${{ matrix.DB_INIT }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build
- name: Test
run: dotnet test --no-build --verbosity normal --logger "trx;LogFileName=${{ matrix.DB }}.trx" --results-directory . ${{ matrix.TEST_PROJECT }}
- name: Publish test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ matrix.DB }}
path: ${{ matrix.DB }}.trx