language: python
python: 3.6
sudo: false
branches:
    only:
        - master
        - /^\d\.\d+$/

env:
    - TOXENV=py34
    - TOXENV=py36
# Learned this from https://github.com/medecau/fn.py/commit/65c774c274181d3a986f2d50836250cb1a0f7224
matrix:
    include:
        - python: 2.7.13
          env: TOXENV=py27
        - python: 3.5
          env: TOXENV=py35

addons:
    apt:
        packages:
            - python-numpy
            - python-scipy
            - libatlas-base-dev
            - liblapack-dev
            - gfortran

install:
    - pip install -U pip tox codecov

script: tox

after_success:
    - codecov

cache:
    directories:
        - $HOME/.cache/pip
