notifications:
  email: false

language: python
python:
    - "2.7"
#    - "3.4"

sudo: false

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

install:
    - conda env create --file environment.yml
    - source activate py2_parcels
    - conda install --yes python=$TRAVIS_PYTHON_VERSION sphinx
    - pip install -e .

before_script: # configure a headless display to test plot generation
    - "export DISPLAY=:99.0"
    - "sh -e /etc/init.d/xvfb start"
    - sleep 3 # give xvfb some time to start

jobs:
    include:
        - script:
            - flake8 parcels
            - flake8 tests
            - flake8 parcels/examples
        - script:
            - parcels_get_examples examples/
            - py.test -v -s tests/
            - py.test -v -s --nbval-lax examples/
        - script:
            - make linkcheck -C docs
          env:
            - 'ALLOW_FAIURE=true'

notifications:
  email: false

language: python
python:
    - "2.7"

sudo: false

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

install:
    - conda env create --file environment.yml
    - source activate py2_parcels
    - conda install --yes python=$TRAVIS_PYTHON_VERSION sphinx
    - pip install -e .

before_script: # configure a headless display to test  plot generation
    - "export DISPLAY=:99.0"
    - "sh -e /etc/init.d/xvfb start"
    - sleep 3 # give xvfb some time to start

script:
    - flake8 parcels
    - flake8 tests
    - parcels_get_examples examples/
    - py.test -v -s tests/
    - py.test -v -s --nbval-lax examples/
    - make linkcheck -C docs

Revert to single script and remove redundant flake
Revert to single script and remove redundant flake
