Skip to content

Commit 943c427

Browse files
committed
test replication with middle schema
1 parent 2cf1d07 commit 943c427

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

.github/workflows/test-install.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ jobs:
66
ubuntu-test-install:
77
runs-on: ubuntu-20.04
88

9+
strategy:
10+
matrix:
11+
flavour: [public, middle_schema]
12+
include:
13+
- flavour: public
14+
options: ""
15+
schema: ""
16+
- flavour: middle_schema
17+
options: "--middle-schema=myschema"
18+
schema: "myschema"
19+
920
env:
1021
LUA_VERSION: 5.3
1122
POSTGRESQL_VERSION: 12
@@ -75,8 +86,16 @@ jobs:
7586
sudo systemctl start postgresql
7687
sudo -u postgres createuser runner
7788
sudo -u postgres createdb -O runner o2ptest
78-
sudo -u postgres psql o2ptest -c "CREATE EXTENSION postgis;"
79-
sudo -u postgres psql o2ptest -c "CREATE EXTENSION hstore;"
89+
sudo -u postgres psql o2ptest -c "CREATE EXTENSION postgis"
90+
sudo -u postgres psql o2ptest -c "CREATE EXTENSION hstore"
91+
92+
- name: Set up schema
93+
run: |
94+
sudo -u postgres psql o2ptest -c "CREATE SCHEMA $SCHEMANAME"
95+
sudo -u postgres psql o2ptest -c "GRANT ALL ON SCHEMA $SCHEMANAME TO runner"
96+
if: ${{ matrix.schema }}
97+
env:
98+
SCHEMANAME: ${{ matrix.schema }}
8099

81100
- name: Remove repository
82101
# Remove contents of workspace to be sure the install runs independently
@@ -92,15 +111,18 @@ jobs:
92111
run: wget --quiet $OSMURL
93112
working-directory: /tmp
94113

95-
- name: Test run of osm2pgsql
96-
run: $PREFIX/bin/osm2pgsql -d o2ptest --slim $OSMFILE
114+
- name: Test run of osm2pgsql (no schema)
115+
run: $PREFIX/bin/osm2pgsql $EXTRAOPTS -d o2ptest --slim $OSMFILE
97116
working-directory: /tmp
117+
env:
118+
EXTRAOPTS: ${{ matrix.options }}
98119

99-
- name: Test run osm2pgsql-replication
120+
- name: Test run osm2pgsql-replication (no schema)
100121
run: |
101-
$PREFIX/bin/osm2pgsql-replication init -v -d o2ptest
102-
$PREFIX/bin/osm2pgsql-replication status -v -d o2ptest
103-
$PREFIX/bin/osm2pgsql-replication update -v -d o2ptest --once --max-diff-size=1
104-
$PREFIX/bin/osm2pgsql-replication status -v -d o2ptest --json
122+
$PREFIX/bin/osm2pgsql-replication init $EXTRAOPTS -v -d o2ptest
123+
$PREFIX/bin/osm2pgsql-replication status $EXTRAOPTS -v -d o2ptest
124+
$PREFIX/bin/osm2pgsql-replication update $EXTRAOPTS -v -d o2ptest --once --max-diff-size=1
125+
$PREFIX/bin/osm2pgsql-replication status $EXTRAOPTS -v -d o2ptest --json
105126
working-directory: /tmp
106-
127+
env:
128+
EXTRAOPTS: ${{ matrix.options }}

0 commit comments

Comments
 (0)