# Travis CI setup

language: python
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"

# Setup anaconda
before_install:
  # http://conda.pydata.org/docs/travis.html
  - sudo apt-get update
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
      sudo apt-get install python-dev build-essential;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
      sudo apt-get install python3-dev build-essential;
    fi
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda config --add channels conda-forge
  - conda update -q conda
  - conda info -a

install:
  - conda create -q -n test-env python=$TRAVIS_PYTHON_VERSION --file requirements/conda.txt
  - source activate test-env
  - pip install -r requirements/requirements.txt
  - pip install -r requirements/test.txt

  - python setup.py install

script:
  - pytest --cov=. --cov-report term-missing --durations 5 tests/

after_success:
  - coveralls -i

# Travis CI setup

language: python
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"

# Setup anaconda
before_install:
  # http://conda.pydata.org/docs/travis.html
  - sudo apt-get update
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
      sudo apt-get install python-dev build-essential;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
      sudo apt-get install python3-dev build-essential;
    fi
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda config --add channels conda-forge
  - conda update -q conda
  - conda info -a

install:
  - conda create -q -n test-env python=$TRAVIS_PYTHON_VERSION --file requirements/conda.txt
  - source activate test-env
  - pip install -r requirements/requirements.txt
  - pip install -r requirements/test.txt

  - python setup.py install

script:
  - pytest --cov=. --cov-report term-missing --durations 5

after_success:
  - coveralls -i

Remove pytest to get proper coverage.
Remove pytest to get proper coverage.
