language: python
python:
  - "3.6"
matrix:
  include:

  # default Python + latest Sphinx + check for broken links
  - env: ADDITIONAL_COMMAND="python -m sphinx doc/ doc/_build/ -b linkcheck"

  # a few older Sphinx releases using default Python version
  - env: SPHINX="==1.6.2"
  - env: SPHINX="==1.6.7"
  - env: SPHINX="==1.7.5"
  - env: SPHINX="==1.8.2"

  # a few Python versions using latest Sphinx release
  - python: "3.4"
  - python: "3.5"
  - python: "nightly"
  # Pandas only works in PyPy >= 5.9, which isn't yet available on Travis-CI
  #- python: "pypy3"

addons:
  apt:
    packages:
      - pandoc
install:
  - pip install Sphinx$SPHINX
  - pip install .
  - pip install -r doc/requirements.txt
script:
  - python -m nbsphinx
  - python -m sphinx doc/ doc/_build/ -b html
  - python -m sphinx doc/ doc/_build/ -b latex
  - python -m sphinx doc/ doc/_build/ -b epub
  - $ADDITIONAL_COMMAND

language: python
python:
  - "3.7"
matrix:
  include:

  # default Python + latest Sphinx + check for broken links
  - env: ADDITIONAL_COMMAND="python -m sphinx doc/ doc/_build/ -b linkcheck"

  # a few older Sphinx releases using default Python version
  - env: SPHINX="==1.6.1"
  - env: SPHINX="==1.6.7"
  - env: SPHINX="==1.7.0"
  - env: SPHINX="==1.7.9"
  - env: SPHINX="==1.8.0"
  - env: SPHINX="==1.8.5"
  - env: SPHINX="==2.0.0"
  - env: SPHINX="==2.1.0"
  - env: SPHINX="==2.1.2"

  # a few Python versions using latest Sphinx release
  - python: "3.4"
  - python: "3.5"
  - python: "3.6"
  - python: "nightly"
  #- python: "pypy3"

addons:
  apt:
    packages:
      - pandoc
install:
  - pip install Sphinx$SPHINX
  - pip install .
  - pip install -r doc/requirements.txt
script:
  - python -m nbsphinx
  - python -m sphinx doc/ doc/_build/ -b html
  - python -m sphinx doc/ doc/_build/ -b latex
  - python -m sphinx doc/ doc/_build/ -b epub
  - $ADDITIONAL_COMMAND

Update Python and Sphinx versions
Travis-CI: Update Python and Sphinx versions
