dependencies:
  cache_directories:
    - "~/.mne"
    - "~/mne_data/MNE-sample-data"
    - "examples/ds117"
  override:
    - pip install --upgrade pip
    - pip install sphinx matplotlib coverage Pillow
    - git clone https://github.com/sphinx-gallery/sphinx-gallery.git
    - cd sphinx-gallery && git fetch --tags && git checkout v0.1.11
    - cd sphinx-gallery && pip install -r requirements.txt && git checkout && python setup.py develop
    - pip install sphinx_bootstrap_theme
    - pip install cython scipy
    - pip install --upgrade mne
    - pip install scikit-learn==0.18
    - pip install scikit-optimize tqdm
    - pip install numpydoc
    - pip install -e .

test:
  override:
    # pipefail is necessary to propagate exit codes
    - set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt
    # workaround - make html returns 0 even if examples fail to build
    # (see https://github.com/sphinx-gallery/sphinx-gallery/issues/45)
    - cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi:
        timeout: 1200

general:
  artifacts:
    - "doc/_build/html"
    - "coverage"
    - "~/log.txt"

dependencies:
  cache_directories:
    - "~/.mne"
    - "~/mne_data/MNE-sample-data"
    - "examples/ds117"
  override:
    - pip install --upgrade pip
    - pip install sphinx matplotlib coverage Pillow
    - git clone https://github.com/sphinx-gallery/sphinx-gallery.git
    - cd sphinx-gallery && pip install -r requirements.txt && python setup.py develop
    - pip install sphinx_bootstrap_theme
    - pip install cython scipy
    - pip install --upgrade mne
    - pip install scikit-learn==0.18
    - pip install scikit-optimize tqdm
    - pip install numpydoc
    - pip install -e .

test:
  override:
    # pipefail is necessary to propagate exit codes
    - set -o pipefail && cd doc && make SPHINXOPTS=-v html 2>&1 | tee ~/log.txt
    # workaround - make html returns 0 even if examples fail to build
    # (see https://github.com/sphinx-gallery/sphinx-gallery/issues/45)
    - cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi:
        timeout: 600

general:
  artifacts:
    - "doc/_build/html"
    - "coverage"
    - "~/log.txt"

Use dev version of sphinx-gallery
Use dev version of sphinx-gallery
