dist: xenial
sudo: false
language: python

matrix:
  include:
    - python: '2.7'
      env: TOXENV=py27
    - python: '3.5'
      env: TOXENV=py35
    - python: '3.6'
      env: TOXENV=py36
    - python: '3.7'
      env: TOXENV=py37
    - python: 'pypy'
      env: TOXENV=pypy
      dist: trusty
    - python: 'pypy3'
      env: TOXENV=pypy3
      dist: trusty
    - env: TOXENV=flake8
    - env: TOXENV=checkspelling
      addons:
        apt:
          packages:
          - aspell
          - aspell-en
    - env: TOXENV=pep517check

addons:
  apt:
    packages:
    - libtidy-0.99-0

install:
  # NOTE: setuptools needs to be installed explicitly for py34 (trusty).
  - pip install 'setuptools>=36' tox

script:
  - tox

after_success:
  - pip install codecov
  - codecov --flags "$TOXENV"

branches:
  only:
    - master

dist: xenial
sudo: false
language: python
cache: pip

matrix:
  include:
    - python: '2.7'
      env: TOXENV=py27
    - python: '3.5'
      env: TOXENV=py35
    - python: '3.6'
      env: TOXENV=py36
    - python: '3.7'
      env: TOXENV=py37
    - python: 'pypy'
      env: TOXENV=pypy
      dist: trusty
    - python: 'pypy3'
      env: TOXENV=pypy3
      dist: trusty
    - env: TOXENV=flake8
    - env: TOXENV=checkspelling
      addons:
        apt:
          packages:
          - aspell
          - aspell-en
    - env: TOXENV=pep517check

addons:
  apt:
    packages:
    - libtidy-0.99-0

install:
  # NOTE: setuptools needs to be installed explicitly for py34 (trusty).
  - pip install 'setuptools>=36' tox

script:
  - tox

after_success:
  - pip install codecov
  - codecov --flags "$TOXENV"

branches:
  only:
    - master

Enable pip cache in Travis CI
Enable pip cache in Travis CI

Reduce load on PyPI servers and slightly speed up builds.

For more information, see:

https://docs.travis-ci.com/user/caching/#pip-cache
