Skip to content

Commit d786d81

Browse files
author
Peet Whittaker
committed
Update CI testing targets for PostGIS
PostgreSQL 10 w/ PostGIS 2.5 (earliest combination not currently EOL) PostgreSQL 14 w/ PostGIS 3.2 (most recent combination currently available) See: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
1 parent 0b14871 commit d786d81

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

Tests.NHibernate.Spatial.PostGis20/nhsp_test.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- psql -h localhost -p 5432 -U postgres -f path-to-this-file.sql
55

66
CREATE ROLE nhsp_test LOGIN
7-
ENCRYPTED PASSWORD 'md5c7a746bb04ce57ee60350ff6a98f9ae6' -- md5('nhsp_test' + salt)
7+
PASSWORD 'nhsp_test'
88
NOSUPERUSER NOINHERIT CREATEDB CREATEROLE;
99

1010
CREATE DATABASE nhsp_test

appveyor.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
---
12
#---------------------------------#
23
# environment configuration #
34
#---------------------------------#
45

56
# Build worker image (VM template)
67
image:
78
- Visual Studio 2022
8-
- Ubuntu
9+
- Ubuntu2004
910

1011
# scripts that run after cloning repository
1112
install:
@@ -36,33 +37,26 @@ install:
3637
# - ps: if ($isWindows) { $iniPath = 'C:\ProgramData\MySQL\MySQL Server 5.7\my.ini' }
3738
# - ps: if ($isWindows) { (Get-Content $iniPath).replace('port=3306', 'port=3307') | Set-Content $iniPath }
3839

39-
# install PostgreSQL 8.4
40-
# - cmd: curl -L -O -S -s https://get.enterprisedb.com/postgresql/postgresql-8.4.22-1-windows.exe
41-
# - cmd: postgresql-8.4.22-1-windows.exe --mode unattended --superpassword Password12! --serverport 5431
42-
43-
# install PostGIS 1.5.5 for PostgreSQL 8.4
44-
# - cmd: curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg84/postgis-pg84-binaries-1.5.5.zip
45-
# - cmd: 7z x postgis-pg84-binaries-1.5.5.zip > nul
46-
# - cmd: xcopy /s /y /q postgis-pg84-binaries-1.5.5 "C:\Program Files (x86)\PostgreSQL\8.4"
47-
# - cmd: SET PGPASSWORD=Password12!
48-
# - cmd: SET PGDIR=C:\Program Files (x86)\PostgreSQL\8.4
49-
# - cmd: SET PATH=%PGDIR%\bin;%PATH%
50-
# - cmd: createdb -p 5431 -U postgres template_postgis
51-
# - cmd: psql -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\postgis.sql"
52-
# - cmd: psql -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\spatial_ref_sys.sql"
53-
54-
# install PostGIS 2.3.2 for PostgreSQL 9.6 on Windows
55-
- cmd: curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg96/archive/postgis-bundle-pg96-2.3.2x64.zip
56-
- cmd: 7z x postgis-bundle-pg96-2.3.2x64.zip > nul
57-
- cmd: xcopy /s /y /q postgis-bundle-pg96-2.3.2x64 "C:\Program Files\PostgreSQL\9.6"
58-
59-
# install PostgreSQL 9.6 and PostGIS 2.4 on Ubuntu
60-
# note: PostGIS 2.3 not available in Ubuntu Bionic 18.04 repository
40+
# install PostGIS 2.5 for PostgreSQL 10 on Windows
41+
- cmd: curl -L -O -S -s https://ftp.postgresql.org/pub/postgis/pg10/v2.5.3/win64/postgis-bundle-pg10x64-setup-2.5.3-2.exe
42+
- cmd: postgis-bundle-pg10x64-setup-2.5.3-2.exe /S /D=C:\Program Files\PostgreSQL\10
43+
44+
# install PostgreSQL 14 and PostGIS 3.2 on Windows
45+
- cmd: curl -L -O -S -s https://get.enterprisedb.com/postgresql/postgresql-14.5-1-windows-x64.exe
46+
- cmd: postgresql-14.5-1-windows-x64.exe --mode unattended --superpassword Password12! --serverport 5433
47+
- cmd: curl -L -O -S -s https://ftp.postgresql.org/pub/postgis/pg14/v3.2.2/win64/postgis-bundle-pg14x64-setup-3.2.2-2.exe
48+
- cmd: postgis-bundle-pg14x64-setup-3.2.2-2.exe /S /D=C:\Program Files\PostgreSQL\14
49+
50+
# install PostgreSQL 10 and PostGIS 2.5 on Ubuntu
6151
- sh: sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -sc)-pgdg main"
6252
- sh: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
6353
- sh: sudo apt-get update
64-
- sh: sudo apt-get -y install postgresql-9.6 postgresql-9.6-postgis-2.4
65-
- sh: sudo sed -i 's/port = [0-9]\+/port = 5432/' /etc/postgresql/9.6/main/postgresql.conf
54+
- sh: sudo apt-get -y install postgresql-10 postgresql-10-postgis-2.5
55+
- sh: sudo sed -i 's/port = [0-9]\+/port = 5432/' /etc/postgresql/10/main/postgresql.conf
56+
57+
# install PostgreSQL 14 and PostGIS 3 on Ubuntu
58+
- sh: sudo apt-get -y install postgresql-14 postgresql-14-postgis-3
59+
- sh: sudo sed -i 's/port = [0-9]\+/port = 5433/' /etc/postgresql/14/main/postgresql.conf
6660

6761
#---------------------------------#
6862
# build configuration #
@@ -105,29 +99,35 @@ before_test:
10599
# - cmd: SET mysql="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"
106100
# - cmd: '%mysql% -P 3307 -u root < Tests.NHibernate.Spatial.MySQL57\nhsp_test.sql'
107101

108-
# setup PostgreSQL 8.4
109-
# - cmd: SET psql="C:\Program Files (x86)\PostgreSQL\8.4\bin\psql.exe"
110-
# - cmd: '%psql% -q -p 5431 -U postgres -f Tests.NHibernate.Spatial.PostGis\nhsp_test.sql'
102+
# setup PostgreSQL 10 on Windows
103+
- cmd: net start postgresql-x64-10
104+
- cmd: SET psql="C:\Program Files\PostgreSQL\10\bin\psql.exe"
105+
- cmd: SET PGPASSWORD=Password12!
106+
- cmd: '%psql% -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql'
111107

112-
# setup PostgreSQL 9.6 on Windows
113-
- cmd: net start postgresql-x64-9.6
114-
- cmd: SET psql="C:\Program Files\PostgreSQL\9.6\bin\psql.exe"
108+
# setup PostgreSQL 14 on Windows
109+
- cmd: SET psql="C:\Program Files\PostgreSQL\14\bin\psql.exe"
115110
- cmd: SET PGPASSWORD=Password12!
116-
- cmd: '%psql% -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql'
111+
- cmd: '%psql% -p 5433 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql'
117112

118-
# setup PostgreSQL 9.6 on Ubuntu
113+
# setup PostgreSQL 10 on Ubuntu
119114
# NOTE: Need to run psql command as postgres user to prevent peer authentication failure
120-
- sh: sudo pg_ctlcluster 9.6 main start
121-
- sh: sudo -u postgres psql -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20/nhsp_test.sql
115+
- sh: sudo pg_ctlcluster 10 main start
116+
- sh: sudo -u postgres psql -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20/nhsp_test.sql
117+
118+
# setup PostgreSQL 14 on Ubuntu
119+
- sh: sudo pg_ctlcluster 14 main start
120+
- sh: sudo -u postgres psql -p 5433 -U postgres -f Tests.NHibernate.Spatial.PostGis20/nhsp_test.sql
122121

123122
test_script:
124123
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MsSql2008.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MsSql2008
125124
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MsSql2012.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MsSql2012
126125
# Disable MySQL tests until issue #87 is resolved
127126
# - cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MySQL.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MySQL
128127
# - cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MySQL57.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MySQL57
129-
# - cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.PostGis
130-
- ps: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis20.trx" --results-directory $env:APPVEYOR_BUILD_FOLDER Tests.NHibernate.Spatial.PostGis20
128+
- ps: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis20_PGSQL10_PG25.trx" --results-directory $env:APPVEYOR_BUILD_FOLDER Tests.NHibernate.Spatial.PostGis20
129+
- ps: $appSettings = 'Tests.NHibernate.Spatial.PostGis20/bin/Release/net6.0/appsettings.json'; (Get-Content $appSettings) -Replace '5432', '5433' | Set-Content $appSettings
130+
- ps: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis20_PGSQL14_PG32.trx" --results-directory $env:APPVEYOR_BUILD_FOLDER Tests.NHibernate.Spatial.PostGis20
131131

132132
after_test:
133133
- ps: $wc = New-Object 'System.Net.WebClient'
@@ -136,5 +136,5 @@ after_test:
136136
- ps: if ($isWindows) { $wc.UploadFile($uri, (Resolve-Path MsSql2012.trx)) }
137137
# - ps: $wc.UploadFile($uri, (Resolve-Path MySQL.trx))
138138
# - ps: $wc.UploadFile($uri, (Resolve-Path MySQL57.trx))
139-
# - ps: if ($isWindows) { $wc.UploadFile($uri, (Resolve-Path PostGis.trx)) }
140-
- ps: $wc.UploadFile($uri, (Resolve-Path PostGis20.trx))
139+
- ps: $wc.UploadFile($uri, (Resolve-Path PostGis20_PGSQL10_PG25.trx))
140+
- ps: $wc.UploadFile($uri, (Resolve-Path PostGis20_PGSQL14_PG32.trx))

0 commit comments

Comments
 (0)