language: python
python:
  - "2.7"

notifications:
  email: false

# Setup anaconda
before_install:
  - sudo apt-get update
  # We do this conditionally because it saves us some downloading if the
  # version is the same.
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
    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 update -q conda
  - conda info -a

install:
  - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy nose
  - source activate test-environment
  - pip install pytest-cov python-coveralls pytest-xdist coverage==3.7.1 #we need this version of coverage for coveralls.io to work
  - pip install pep8 pytest-pep8
  - python setup.py install

script:
  - nosetests --with-coverage --cover-package=sbdc --cov-config .coveragerc --logging-level=INFO

after_success:
  - coveralls --config_file .coveragerc

language: python
python:
  - "2.7"

notifications:
  email: false

# Setup anaconda
before_install:
  - sudo apt-get update
  # We do this conditionally because it saves us some downloading if the
  # version is the same.
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
    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 update -q conda
  - conda info -a

install:
  - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy pytest
  - source activate test-environment
  - pip install pytest-cov python-coveralls pytest-xdist coverage==3.7.1 #we need this version of coverage for coveralls.io to work
  - pip install pep8 pytest-pep8
  - python setup.py install

script:
  - PYTHONPATH=$PWD:$PYTHONPATH py.test -s -v --pep8 --cov=sbdc --cov-config .coveragerc --cov-report term-missing tests

after_success:
  - coveralls --config_file .coveragerc

Replace nose with py.test for Travis CI configuration
Replace nose with py.test for Travis CI configuration
