dist: xenial
sudo: false
language: python

matrix:
  include:
    - python: '2.7'
      env: TOXENV=py27
    - python: '3.4'
      env: TOXENV=py34
      dist: trusty
    - 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

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
