I’m trying to setup PostgreSQL 12 + PostGIS 3 for my CI.
My workflow is defined as below:
jobs: build: runs-on: ubuntu-latest services: postgres: image: postgres:12 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: culturinthecity_test ports: - 5432/tcp options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - name: Checkout latest code uses: actions/checkout@v1 - name: Setup Ruby uses: eregon/use-ruby-action@v1 with: ruby-version: 2.6.5 - name: Print Ruby version run: ruby -v - name: Install PostgreSQL 12 client required for loading structure.sql run: | sudo bash -c "echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main >> /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get -yq install libpq-dev postgresql-client-12 postgresql-12-postgis-3 postgresql-12-postgis-3-scripts
The installation works fine but when I try to load my structure.sql file, it fails with the error below when creating the postgis extension in the database.
psql:/home/runner/work/App-NE/App-NE/db/structure.sql:30: ERROR: could not open extension control file "/usr/share/postgresql/12/extension/postgis.control": No such file or directory
When looking into /share/postgresql/12/extension, I have two files:
The second file is setup during installation and is a symlink to another file containing the following info:
# postgis extension 483 comment = 'PostGIS geometry, geography, and raster spatial types and functions' 484 default_version = '3.0.0' 485 module_pathname = '$libdir/postgis-3' 486 relocatable = false
I don’t understand why it doesn’t work.
Do you have any input on the subject?