Skip to content

Update packages

Update packages #145

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:13-3.1
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: password
CFLAGS: "-O0"
steps:
- uses: actions/checkout@v2
- name: Install system packages
run: sudo apt-get install -y binutils libproj-dev gdal-bin
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Load cached venv
uses: actions/cache@v2
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
env:
POETRY_VIRTUALENVS_CREATE: "false"
run: |
pip install poetry==1.4.2
poetry install --no-interaction --no-root
- name: Set up database & config
run: |
createdb mapit
psql -d mapit -c 'create extension postgis; create extension pg_trgm;'
echo 'MAPIT_DB_NAME: mapit' > conf/general.yml
echo 'MAPIT_DB_USER: postgres' >> conf/general.yml
echo 'MAPIT_DB_PASS: password' >> conf/general.yml
echo 'MAPIT_DB_HOST: localhost' >> conf/general.yml
echo 'DJANGO_SECRET_KEY: secret' >> conf/general.yml
- name: Run tests
env:
SECRET_KEY: 'secret'
DATABASE_URL: 'postgis://postgres:password@localhost/mapit'
COBRAND: 'cobrand_hackney'
run: python manage.py test