diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index add7354..9d57a73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,15 @@ jobs: python-version: ${{ matrix.python-version }} cache: pip cache-dependency-path: setup.cfg + # https://docs.djangoproject.com/en/4.2/ref/contrib/gis/install/geolibs/ + - run: | + sudo apt update + sudo apt install binutils libproj-dev gdal-bin - 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 diff --git a/README.rst b/README.rst index a02024f..7806520 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/settings.py b/settings.py index c2738f4..2f258ef 100644 --- a/settings.py +++ b/settings.py @@ -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