language: python
python:
  - "2.7"
  - "3.5"
  - "3.6"
before_install:
  - pip install --upgrade pip setuptools wheel
  - pip install coveralls
  - pip install pytest pytest-cov
  - pip install --only-binary=numpy numpy
  - pip install --only-binary=scipy scipy
  - pip install --only-binary=netcdf4 netcdf4
  - pip install affine
install:
  - python setup.py install
script:
  - pytest --cov --cov-report=xml:$(pwd)/coverage.xml
after_success:
  - coveralls

language: generic

os:
  - osx
  - linux

env:
  matrix:
    - TRAVIS_PYTHON_VERSION="2.7"
    - TRAVIS_PYTHON_VERSION="3.6"
    - TRAVIS_PYTHON_VERSION="3.7"
  global:
    - CONDA_PREFIX=$HOME/miniconda
    - MINICONDA_URL_BASE="https://repo.continuum.io/miniconda/Miniconda3-latest"

before_install:
  - |
    if [[ $TRAVIS_OS_NAME == "osx" ]]; then
      brew remove --force $(brew list)
      brew cleanup -s
      rm -rf $(brew --cache)
      fi
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      OS="MacOSX-x86_64"
      else
      OS="Linux-x86_64"
    fi
  - curl $MINICONDA_URL_BASE-$OS.sh > $HOME/minconda.sh
  - bash $HOME/minconda.sh -b -p $CONDA_PREFIX
  - export PATH="$CONDA_PREFIX/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda config --add channels conda-forge
  - conda create -n _testing python=$TRAVIS_PYTHON_VERSION
  - source activate _testing
  - conda install -q affine netCDF4 scipy numpy pyyaml python-dateutil
  - conda install pytest pytest-cov coveralls

install:
  - python setup.py install

script:
  - pytest --cov --cov-report=xml:$(pwd)/coverage.xml

after_success:
  - coveralls

Use conda instead of pip to install dependencies
Use conda instead of pip to install dependencies
