Skip to content

Commit

Permalink
ci: Set PYTHONPATH and install GDAL
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 10, 2023
1 parent fa3e03d commit 6d16bbb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
- uses: actions/setup-gdal@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: pip install .[test] '${{ matrix.django-version }}' psycopg2-binary
- env:
PORT: ${{ job.services.postgres.ports[5432] }}
run: django-admin migrate --settings settings --noinput
DJANGO_SETTINGS_MODULE: settings
run: env PYTHONPATH=$PYTHONPATH:$PWD django-admin migrate --noinput
- env:
PORT: ${{ job.services.postgres.ports[5432] }}
run: coverage run --source=boundaries runtests.py
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Testing

createdb represent_boundaries_test
psql represent_boundaries_test -c 'CREATE EXTENSION postgis;'
django-admin migrate --settings settings --noinput
env DJANGO_SETTINGS_MODULE=settings django-admin migrate --noinput
python runtests.py

Acknowledgements
Expand Down
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
To run `PYTHONPATH=$PYTHONPATH:$PWD django-admin.py migrate --settings settings --noinput`.
To run `env PYTHONPATH=$PYTHONPATH:$PWD DJANGO_SETTINGS_MODULE=settings django-admin.py migrate --noinput`.
"""
import os

Expand Down

0 comments on commit 6d16bbb

Please sign in to comment.