language: python

services:
  - postgresql

python:
  - "3.4"
  - "3.3"
  - "2.7"
  - "2.6"

env:
  - DJANGO="django==1.7.7"
  - DJANGO="django==1.6.11"
  - DJANGO="django==1.5.12"

matrix:
  exclude:
    - python: "2.6"
      env: DJANGO="django==1.7.7"

branches:
  only:
    - master

# command to install requirements
install:
  - pip install $DJANGO
  - pip install -r requirements.txt
  - pip install coverage coveralls
  - python setup.py -q install

before_script:
  - psql template1 -c 'create extension hstore;'
  - createdb django_hstore
  - psql -U postgres -d django_hstore -c "CREATE EXTENSION postgis;"
  - psql -U postgres -d django_hstore -c "CREATE EXTENSION postgis_topology;"
  - createdb django_hstore_psycopg2

# command to run tests, e.g. python setup.py test
script:
  - ./runtests.py --settings=settings_psycopg
  - coverage run --source django_hstore runtests.py

after_success:
  coveralls
