language: python

env:
  - "2.6"
  - "2.7"

cache:
  directories:
    - $HOME/miniconda

before_install:
 - export MINICONDA=$HOME/miniconda 
 - export PATH="$MINICONDA/bin:$PATH"
 - hash -r
 - command -v conda >/dev/null || { wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
   bash miniconda.sh -b -f -p $MINICONDA; }
 - conda config --set always_yes yes
 - conda update conda
 - conda info -a
 - conda install python=$TRAVIS_PYTHON_VERSION
 - conda create -q -n moca-test python=$TRAVIS_PYTHON_VERSION --file conda-requirements.txt
 - source activate moca-test
 - travis_retry pip install codecov nose2[coverage-plugin] coveralls

install:
  - python setup.py install --single-version-externally-managed --record=/tmp/record.txt

after_success:
  - codecov
  - coveralls

script: nose2 -v --with-coverage

deploy:
  provider: pypi
  distributions: sdist bdist_wheel
  user: saketkc
  password:
    secure: PLEASE_REPLACE_ME
  on:
    tags: true
    repo: saketkc/moca
    condition: $TOXENV == py27

language: python

env:
  - "2.6"
  - "2.7"

cache:
  directories:
    - $HOME/miniconda

before_install:
 - export MINICONDA=$HOME/miniconda 
 - export PATH="$MINICONDA/bin:$PATH"
 - hash -r
 - command -v conda >/dev/null || { wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
   bash miniconda.sh -b -f -p $MINICONDA; }
 - conda config --set always_yes yes
 - conda update conda
 - conda info -a
 - conda install python=$TRAVIS_PYTHON_VERSION
 - conda create -q -n moca-test python=$TRAVIS_PYTHON_VERSION --file conda-requirements.txt
 - source activate moca-test
 - travis_retry pip install codecov nose2[coverage-plugin] coveralls

install:
  - python setup.py install --single-version-externally-managed --record=/tmp/record.txt

after_success:
  - conda remove --name moca-test --all
  - codecov
  - coveralls

after_failure:
  - conda remove --name moca-test --all


script: nose2 -v --with-coverage

deploy:
  provider: pypi
  distributions: sdist bdist_wheel
  user: saketkc
  password:
    secure: PLEASE_REPLACE_ME
  on:
    tags: true
    repo: saketkc/moca
    condition: $TOXENV == py27

Remove conda env after testing
Remove conda env after testing
