language: python
cache: pip
install: travis_retry pip install -U tox
script: tox
jobs:
  fast_finish: true

  include:
  - { python: '3.6', env: TOXENV=lint }
  - { python: '2.7', env: TOXENV=py27 }
  - { python: '3.5', env: TOXENV=py35 }
  - { python: '3.6', env: TOXENV=py36 }
  - { python: '3.7', env: TOXENV=py37, dist: xenial }
  - { python: '3.6', env: TOXENV=docs }

  - stage: PyPI Release
    if: tag IS present
    python: "3.6"
    env: []
    install: skip
    script: skip
    deploy:
      provider: pypi
      user: sloria
      on:
        tags: true
      distributions: sdist bdist_wheel
      password:
        secure: ESoVNuEqjuNGCCGMbjHwIJS3LfPL2BKPQG5RuDiW8qo4+BN25yobiD+Bo7kozUtUHVKa6oTdi4Gqb1i5IUKNcaP0qBItdkk3LPOAUyOhdFZF+dL22JhajJ6LNO7i1cyUTzjYaS2cOTG8kSSYd7W9Okfp5bY6HtUNgCqhI1mZfMU=

language: python
dist: xenial
cache: pip
install: travis_retry pip install -U tox
script: tox
jobs:
  fast_finish: true

  include:
  - { python: '3.6', env: TOXENV=lint }
  - { 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: '3.6', env: TOXENV=docs }

  - stage: PyPI Release
    if: tag IS present
    python: "3.6"
    env: []
    install: skip
    script: skip
    deploy:
      provider: pypi
      user: sloria
      on:
        tags: true
      distributions: sdist bdist_wheel
      password:
        secure: ESoVNuEqjuNGCCGMbjHwIJS3LfPL2BKPQG5RuDiW8qo4+BN25yobiD+Bo7kozUtUHVKa6oTdi4Gqb1i5IUKNcaP0qBItdkk3LPOAUyOhdFZF+dL22JhajJ6LNO7i1cyUTzjYaS2cOTG8kSSYd7W9Okfp5bY6HtUNgCqhI1mZfMU=

Use Xenial for all builds
Use Xenial for all builds

This was special cased for Python 3.7, but it supports all of the versions of Python we test on so it makes sense to just use it for all builds.
