Skip to content

Commit

Permalink
back to postgis:15-3.3(test on latest)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Jan 12, 2025
1 parent b856e40 commit 666efe6
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,25 +326,46 @@ jobs:
ext: '.exe'
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
env:
# PG_* variables are used by psql
PGDATABASE: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
services:
postgres:
image: postgis/postgis:15-3.3
ports:
- 5432/tcp
options: >-
-e POSTGRES_DB=test
-e POSTGRES_USER=postgres
-e POSTGRES_PASSWORD=postgres
-e PGDATABASE=test
-e PGUSER=postgres
-e PGPASSWORD=postgres
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--entrypoint sh
postgis/postgis:15-3.3
-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"
steps:
- name: Install and run Postgis
uses: nyurik/action-setup-postgis@v2
id: pg
with: { username: 'test', password: 'test', database: 'test' }
# - name: Install and run Postgis
# uses: nyurik/action-setup-postgis@v2
# id: pg
# with: { username: 'test', password: 'test', database: 'test' }
- name: Start NGINX
uses: nyurik/[email protected]
id: nginx
with: { port: '5412', output-unix-paths: 'yes' }
- name: Checkout sources
uses: actions/checkout@v4
- name: Init database
run: |
echo "DATABASE_URL=${{ steps.pg.outputs.connection-uri }}"
echo "Print the same in base64 to bypass Github's obfuscation (uses hardcoded password):"
echo "${{ steps.pg.outputs.connection-uri }}" | base64
tests/fixtures/initdb.sh
run: tests/fixtures/initdb.sh
env:
PGSERVICE: ${{ steps.pg.outputs.service-name }}
PGPORT: ${{ job.services.postgres.ports[5432] }}
- name: Copy static files
run: cp -r tests/fixtures/pmtiles2/* ${{ steps.nginx.outputs.html-dir }}
- name: Download build artifact build-${{ matrix.target }}
Expand All @@ -363,7 +384,7 @@ jobs:
fi
tests/test.sh
env:
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=require
- name: Compare test output results (Linux)
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: diff --brief --recursive --new-file tests/output tests/expected
Expand All @@ -383,7 +404,7 @@ jobs:
export MBTILES_BIN=/usr/bin/mbtiles${{ matrix.ext }}
tests/test.sh
env:
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=require
- name: Save test output (on error)
if: failure()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 666efe6

Please sign in to comment.