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

Use official postgis docker image in CI #355

Merged
merged 8 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,30 @@ jobs:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

services:
postgis:
image: postgis/postgis
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

env:
PGPASSWORD: postgres
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]

steps:
- uses: actions/checkout@v3

- name: Setup PostgreSQL with PostGIS
uses: huaxk/postgis-action@v1
with:
postgresql version: '11'
postgresql db: 'postgres'
postgresql user: 'postgres'

- name: Install PostgreSQL dependencies
- name: Set up PostgreSQL
run: |
sudo apt-get update
sudo apt-get install -y gdal-bin
psql -c "CREATE ROLE runner SUPERUSER LOGIN CREATEDB;" -U postgres -h localhost -p 5432
psql template1 -c "CREATE EXTENSION citext;" -U postgres -h localhost -p 5432
psql template1 -c "CREATE EXTENSION hstore;" -U postgres -h localhost -p 5432
psql template1 -c "CREATE EXTENSION postgis;" -U postgres -h localhost -p 5432
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- Fixed a bug with `seq` being passed a tz-aware start value [PR #353](https://github.com/model-bakers/model_bakery/pull/353)
- [dev] Use official postgis docker image in CI [PR #355](https://github.com/model-bakers/model_bakery/pull/355)

### Removed

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ setenv =
PYTHONPATH={toxinidir}
postgresql: TEST_DB=postgis
postgresql: PGUSER=postgres
postgresql: PGPASSWORD=postgres
sqlite: TEST_DB=sqlite
sqlite: USE_TZ=True
deps =
Expand Down