sudo: false
language: python
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"

env:
  global:
    - secure: 

notifications:
  email: false

before_install:
  - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
  - chmod +x miniconda.sh
  - ./miniconda.sh -b -p $HOME/miniconda
  - export PATH=$HOME/miniconda/bin:$PATH
  - export PATH=$HOME/miniconda:$PATH
  - conda update --yes conda

install:
  - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib scikit-learn sphinx
  - pip install -r requirements.txt
  - python setup.py install
  - cd src/
script:
  - py.test --cov-config .coveragerc --cov=qinfer
  - pylint --py3k qinfer/
  - cd ~/doc
  - make doctest

after_success:
  - coveralls

before_deploy:
  # For why this is needed, see:
  # http://stackoverflow.com/questions/36635650/travisci-deploy-cannot-find-setup-py
  - cd ~/

deploy:
  provider: pypi
  user: ${PYPI_USERNAME}
  password: ${PYPI_PASSWORD}
  distributions: "sdist bdist_wheel"
  on:
    tags: true

sudo: false
language: python
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"

env:
  global:
    - secure: 

notifications:
  email: false

before_install:
  - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
  - chmod +x miniconda.sh
  - ./miniconda.sh -b -p $HOME/miniconda
  - export PATH=$HOME/miniconda/bin:$PATH
  - export PATH=$HOME/miniconda:$PATH
  - conda update --yes conda

install:
  - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib scikit-learn sphinx
  - pip install -r requirements.txt
  - python setup.py install
  - cd src/

script:
  - py.test --cov-config .coveragerc --cov=qinfer
  - pylint --py3k qinfer/
  - cd $TRAVIS_BUILD_DIR/doc
  - make doctest

after_success:
  - coveralls

before_deploy:
  # For why this is needed, see:
  # http://stackoverflow.com/questions/36635650/travisci-deploy-cannot-find-setup-py
  - cd $TRAVIS_BUILD_DIR

deploy:
  provider: pypi
  user: ${PYPI_USERNAME}
  password: ${PYPI_PASSWORD}
  distributions: "sdist bdist_wheel"
  on:
    tags: true

Fix for cd'ing into Travis builddir.
Fix for cd'ing into Travis builddir.
