os: linux
dist: trusty
sudo: false
group: edge

language: python
python:
  - 2.7
  - 3.3
  - 3.4
  - 3.5
  - 3.6
  - 3.6-dev
  - nightly # == 3.7-dev
  - &pypy2 pypy2.7-5.8.0
  - &pypy3 pypy3.5-5.8.0

jobs:
  fast_finish: true
  allow_failures:
    - python: *pypy2
    - python: *pypy3

env:
  BLUEBERRYPY_CONFIG: '{}'

cache: pip

addons:
  postgresql: 9.6
  apt:
    packages:
    - postgresql-9.6-postgis-2.3

services:
  - postgresql
  - redis-server

before_install:
  - pip install --upgrade setuptools pip tox
install:
  - psql --command="CREATE ROLE tester PASSWORD 'tester' INHERIT LOGIN;" --username=postgres
  - createdb --encoding=UTF-8 --username=postgres --owner=tester test_blueberrypy
  - psql --command='CREATE EXTENSION postgis;' --dbname=test_blueberrypy --username=postgres
  - psql --command='CREATE EXTENSION postgis_topology;' --dbname=test_blueberrypy --username=postgres

script: tox

notifications:
  email: true

os: linux
dist: trusty
sudo: false
group: edge

language: python
python:
  - 2.7
  - 3.3
  - 3.4
  - 3.5
  - 3.6
  - 3.6-dev
  - nightly # == 3.7-dev
  - &pypy2 pypy2.7-5.8.0
  - &pypy3 pypy3.5-5.8.0

jobs:
  fast_finish: true

env:
  BLUEBERRYPY_CONFIG: '{}'

cache: pip

addons:
  postgresql: 9.6
  apt:
    packages:
    - postgresql-9.6-postgis-2.3

services:
  - postgresql
  - redis-server

before_install:
  - pip install --upgrade setuptools pip tox
install:
  - psql --command="CREATE ROLE tester PASSWORD 'tester' INHERIT LOGIN;" --username=postgres
  - createdb --encoding=UTF-8 --username=postgres --owner=tester test_blueberrypy
  - psql --command='CREATE EXTENSION postgis;' --dbname=test_blueberrypy --username=postgres
  - psql --command='CREATE EXTENSION postgis_topology;' --dbname=test_blueberrypy --username=postgres

script: tox

notifications:
  email: true

Remove PyPy envs from allowed to fail list
Remove PyPy envs from allowed to fail list
