Skip to content

Commit 666efe6

Browse files
committed
back to postgis:15-3.3(test on latest)
1 parent b856e40 commit 666efe6

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

.github/workflows/ci.yml

+33-12
Original file line numberDiff line numberDiff line change
@@ -326,25 +326,46 @@ jobs:
326326
ext: '.exe'
327327
- target: x86_64-unknown-linux-gnu
328328
os: ubuntu-latest
329+
env:
330+
# PG_* variables are used by psql
331+
PGDATABASE: test
332+
PGHOST: localhost
333+
PGUSER: postgres
334+
PGPASSWORD: postgres
335+
services:
336+
postgres:
337+
image: postgis/postgis:15-3.3
338+
ports:
339+
- 5432/tcp
340+
options: >-
341+
-e POSTGRES_DB=test
342+
-e POSTGRES_USER=postgres
343+
-e POSTGRES_PASSWORD=postgres
344+
-e PGDATABASE=test
345+
-e PGUSER=postgres
346+
-e PGPASSWORD=postgres
347+
--health-cmd pg_isready
348+
--health-interval 10s
349+
--health-timeout 5s
350+
--health-retries 5
351+
--entrypoint sh
352+
postgis/postgis:15-3.3
353+
-c "exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
329354
steps:
330-
- name: Install and run Postgis
331-
uses: nyurik/action-setup-postgis@v2
332-
id: pg
333-
with: { username: 'test', password: 'test', database: 'test' }
355+
# - name: Install and run Postgis
356+
# uses: nyurik/action-setup-postgis@v2
357+
# id: pg
358+
# with: { username: 'test', password: 'test', database: 'test' }
334359
- name: Start NGINX
335360
uses: nyurik/[email protected]
336361
id: nginx
337362
with: { port: '5412', output-unix-paths: 'yes' }
338363
- name: Checkout sources
339364
uses: actions/checkout@v4
340365
- name: Init database
341-
run: |
342-
echo "DATABASE_URL=${{ steps.pg.outputs.connection-uri }}"
343-
echo "Print the same in base64 to bypass Github's obfuscation (uses hardcoded password):"
344-
echo "${{ steps.pg.outputs.connection-uri }}" | base64
345-
tests/fixtures/initdb.sh
366+
run: tests/fixtures/initdb.sh
346367
env:
347-
PGSERVICE: ${{ steps.pg.outputs.service-name }}
368+
PGPORT: ${{ job.services.postgres.ports[5432] }}
348369
- name: Copy static files
349370
run: cp -r tests/fixtures/pmtiles2/* ${{ steps.nginx.outputs.html-dir }}
350371
- name: Download build artifact build-${{ matrix.target }}
@@ -363,7 +384,7 @@ jobs:
363384
fi
364385
tests/test.sh
365386
env:
366-
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
387+
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=require
367388
- name: Compare test output results (Linux)
368389
if: matrix.target == 'x86_64-unknown-linux-gnu'
369390
run: diff --brief --recursive --new-file tests/output tests/expected
@@ -383,7 +404,7 @@ jobs:
383404
export MBTILES_BIN=/usr/bin/mbtiles${{ matrix.ext }}
384405
tests/test.sh
385406
env:
386-
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
407+
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=require
387408
- name: Save test output (on error)
388409
if: failure()
389410
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)