# Use a newer travis environment:
# https://docs.travis-ci.com/user/trusty-ci-environment/
# needs these two lines:
sudo: required
dist: xenial # required for Python >=3.7 (travis-ci/travis-ci#9069), and defaults to newer texlive install.
language: python

matrix:
    include:
        - python: 2.7
        - python: 3.5
        - python: 3.6
        - python: 3.7
        - python: nightly
    allow_failures:
        - python: nightly
env:
  global:
    - PATH=$TRAVIS_BUILD_DIR/bin:$PATH
addons:
  apt:
    packages:
    - texlive-latex-extra # we need this for all the latex package we use, recommended is not enough
    - texlive-generic-recommended # .. and more ...
    - latex-xcolor # ... and more latex packages
    - texlive-fonts-recommended # fonts...
    - cm-super # more fonts
    - texlive-xetex # latex to pdf converter
    - inkscape # for svgs in pdf output
    - lmodern # latex package
    - texlive-generic-extra
install:
    - wget https://github.com/jgm/pandoc/releases/download/2.7/pandoc-2.7-1-amd64.deb && sudo dpkg -i pandoc-2.7-1-amd64.deb
    - pip install --upgrade setuptools pip pytest
    - pip install -f travis-wheels/wheelhouse . codecov coverage
    - pip install nbconvert[execute,serve,test]
    - pip install check-manifest
    - python -m ipykernel.kernelspec --user
script:
    - check-manifest
    # cd so we test the install, not the repo
    - cd `mktemp -d`
    - py.test --cov nbconvert -v --pyargs nbconvert
after_success:
    - codecov
