notifications:
  email: false
dist: bionic  # ubuntu 18.04
language: python
os: linux
jobs:
  include:
    - python: "3.6"
      env: ONLY_PYTEST=true

before_install:
  - wget https://repo.continuum.io/miniconda/Miniconda3-latest-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 --set show_channel_urls yes
  - conda config --set channel_priority strict
  - conda config --set add_pip_as_python_dependency yes
  - conda config --remove channels defaults
  - conda config --add channels conda-forge
  - conda update -q conda

install:
  - conda install --yes python=$TRAVIS_PYTHON_VERSION pip numpy scipy scikit-learn joblib pytest coverage -yq
  - pip install -U mne 
  - pip install check-manifest flake8
script:
  - set -e  # exit at first failure otherwise test might fail but build still passes
  - check-manifest;
  - flake8 hidimstat examples;
  - if [ "$ONLY_PYTEST" = true ]; then
      coverage run -m pytest;
      coverage report;
      coverage html;
    fi
  - export CODECOV_TOKEN="b7d1afb7-9730-4e21-882a-d0e893108def"
  - bash <(curl -s https://codecov.io/bash)