language: python
sudo: false
python:
    - 2.7
    - 3.4
virtualenv:
    system_site_packages: false
before_install:
    - export DISPLAY=:99.0
    - wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh
    - bash miniconda.sh -b -p $HOME/miniconda
    - export PATH="$HOME/miniconda/bin:$PATH"
    - conda config --set always_yes yes --set changeps1 no
    - conda update -q conda
    - conda info -a

    - conda create -q -n mic-test python=$TRAVIS_PYTHON_VERSION numpy scipy pillow scikit-learn scikit-image toolz cytoolz pandas setuptools pip pymongo=2.8.1 matplotlib six h5py
    - source activate mic-test

    - pip install pytest coverage pytest-cov sh
    - pip install coveralls

before_script:
    - sleep 15
    - mongo mydb_test --eval 'db.addUser("travis", "test");'

script:
    - python setup.py develop
    - py.test

after_success:
    - if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then coveralls; fi

services:
    mongodb

language: python
sudo: false
python:
    - 2.7
    - 3.4
virtualenv:
    system_site_packages: false
before_install:
    - export DISPLAY=:99.0
    - wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh
    - bash miniconda.sh -b -p $HOME/miniconda
    - export PATH="$HOME/miniconda/bin:$PATH"
    - conda config --set always_yes yes --set changeps1 no
    - conda update -q conda
    - conda info -a

    - conda create -q -n mic-test python=$TRAVIS_PYTHON_VERSION numpy scipy pillow scikit-learn scikit-image toolz cytoolz pandas setuptools pip pymongo=2.8 matplotlib six h5py
    - source activate mic-test

    - pip install pytest coverage pytest-cov sh
    - pip install coveralls

before_script:
    - sleep 15
    - mongo mydb_test --eval 'db.addUser("travis", "test");'

script:
    - python setup.py develop
    - py.test

after_success:
    - if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then coveralls; fi

services:
    mongodb

Use pymongo 2.8 on conda, no 2.8.1 available
Use pymongo 2.8 on conda, no 2.8.1 available
