Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS not available #52

Open
Pinnokkio opened this issue Dec 7, 2024 · 0 comments
Open

PostGIS not available #52

Pinnokkio opened this issue Dec 7, 2024 · 0 comments

Comments

@Pinnokkio
Copy link

steps:
  - uses: actions/checkout@v4
  - uses: ./.github/actions/prepare # Just installs PHP and dependencies
    with:
      token: ${{ secrets.GH_TOKEN }}


  - uses: ikalnytskyi/action-setup-postgres@v7
    id: postgres

  - env:
      PGSERVICE: ${{ steps.postgres.outputs.service-name }}
    run: |
      createuser username
      createdb --owner username postgres_tests
      psql -c "ALTER USER username WITH PASSWORD 'password'"
      psql -c "ALTER USER username WITH SUPERUSER;"


  - name: Run tests
    env:
      DB_CONNECTION: pgsql
      DB_DATABASE: postgres_tests
      DB_PORT: 5432
      DB_USERNAME: username
      DB_PASSWORD: password
    run: php artisan test

It still says PDOException: SQLSTATE[42704]: Undefined object: 7 ERROR: type "geometry" does not exist which means PostGIS is not available in PostgreSQL. Any ideas how to fix this? When running CREATE EXTENSION postgis, I'm getting an error:

ERROR:  extension "postgis" is not available
DETAIL:  Could not open extension control file "/usr/share/postgresql/[17](https://github.com/.../.../actions/runs/12208658718/job/34061268966?pr=549#step:5:18)/extension/postgis.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.
Error: Process completed with exit code 1.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant