language: python
sudo: false
python:
  - 2.6
  - 2.7
  - 3.3
  - 3.4
  - 3.5
  - 3.6
  - pypy

cache:
    directories:
        - $HOME/.hypothesis

env:
  global:
    - HYPOTHESIS_STORAGE_DIRECTORY=$HOME/.hypothesis

install:
  - travis_retry pip install --upgrade pip
  - travis_retry pip install --upgrade --upgrade-strategy only-if-needed pytest pytest-catchlog
  # Hypothesis doesn't work on 2.6
  - if [ $TRAVIS_PYTHON_VERSION != "2.6" ]; then travis_retry pip install hypothesis; fi
  - pip install .

# Run test
script:
  - py.test

notifications:
  email:
    on_success: change
    on_failure: always
