language: python
python:
  - "3.5"
cache: pip
install:
  - pip install -r requirements.txt
script:
  - python manage.py test
services:
  - postgresql
addons:
  postgresql: "9.4"

before_script:
  - sudo apt-get update
  - sudo /etc/init.d/postgresql stop
  - sudo /etc/init.d/postgresql start 9.3
  - apt-get install postgresql-9.4-postgis-2.3
  - psql -c 'create database test;' -U postgres
  - psql -c 'create database django;' -U postgres
  - psql -U postgres -c "create extension postgis;" test
  - python manage.py migrate
language: python
python:
  - "3.5"
cache: pip
install:
  - pip install -r requirements.txt
script:
  - python manage.py test
services:
  - postgresql
addons:
  postgresql: "9.4"

before_script:
  - sudo apt-get update
  - sudo /etc/init.d/postgresql stop
  - sudo /etc/init.d/postgresql start 9.3
  - sudo apt-get install postgresql-9.4-postgis-2.3
  - psql -c 'create database test;' -U postgres
  - psql -c 'create database django;' -U postgres
  - psql -U postgres -c "create extension postgis;" test
  - python manage.py migrate
Add sudo for postgis installation
Add sudo for postgis installation
