language: python
sudo: false
python:
  - "3.5"
virtualenv:
  system_site_packages: false
install:
  - export CONDA=$HOME/miniconda
  - export PATH="$CONDA/bin:$PATH"
  # install conda, but only if it doesn't already exist
  - command -v conda > /dev/null || {
        wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
        bash miniconda.sh -b -f -p $CONDA; }
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda

  # try to create env, but ignore if it fails -- probably cached.
  - conda env create || true
  - source activate gala 
  - conda info -a

  # custom package not available from conda
  - pip install viridis

  # install testing and coverage packages
  - pip install pytest pytest-cov
  - pip install coveralls

  # Install gala
  - printenv PWD
  # Build locally, pytest confuses local and global installs
  - python setup.py develop

script:
  # Run tests
  - py.test

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

cache:
    directories:
        - $HOME/miniconda
        - $HOME/.matplotlib

language: python
sudo: false
python:
  - "3.5"
virtualenv:
  system_site_packages: false
install:
  - export CONDA=$HOME/miniconda
  - export PATH="$CONDA/bin:$PATH"
  # install conda, but only if it doesn't already exist
  - command -v conda > /dev/null || {
        wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
        bash miniconda.sh -b -f -p $CONDA; }
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda

  # try to create env, but ignore if it fails -- probably cached.
  - conda env create -q || true
  - source activate gala 
  - conda info -a

  # custom package not available from conda
  - pip install viridis

  # install testing and coverage packages
  - pip install pytest pytest-cov
  - pip install coveralls

  # Install gala
  - printenv PWD
  # Build locally, pytest confuses local and global installs
  - python setup.py develop

script:
  # Run tests
  - py.test

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

cache:
    directories:
        - $HOME/miniconda
        - $HOME/.matplotlib

Create env quietly to minimise Travis noise
Create env quietly to minimise Travis noise
