diff --git a/.travis.yml b/.travis.yml index 950b0b2c9..4a95ac062 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: python python: - "3.6" + - "3.6@conda" - "pypy" - "2.7" - "3.4" @@ -12,9 +13,29 @@ matrix: sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069) install: - # command to install dependencies - - pip install -r requirements-dev.txt - - pip install -r requirements.txt + - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6@conda" ]]; then + # We use conda in order to install pandoc + # https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html + sudo apt-get update + 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" + hash -r + conda config --set always_yes yes --set changeps1 no + conda update -q conda + conda config --append channels conda-forge + # Conda info + conda info -a + # Install dependencies + conda create -q -n jupytext-env python=$TRAVIS_PYTHON_VERSION --file requirements-dev.txt --file requirements.txt + source activate jupytext-env + conda install pandoc codecov -c conda-forge + pandoc -v + else + # command to install dependencies + pip install -r requirements-dev.txt + pip install -r requirements.txt + fi # install is required for testing the pre-commit mode - pip install . # install black if available (Python 3.6 and above), and autopep8 for testing the pipe mode @@ -22,10 +43,6 @@ install: - pip install autopep8 || true # install sphinx_gallery and matplotlib if available (may not work on pypy) - pip install sphinx_gallery || true - # download and install pandoc 2.7.2 - - wget https://github.com/jgm/pandoc/releases/download/2.7.2/pandoc-2.7.2-linux.tar.gz - - tar xvzf pandoc-2.7.2-linux.tar.gz - - PATH=pandoc-2.7.2/bin:$PATH pandoc -v before_script: # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics