dist: trusty
sudo: false
language: python

python:
- 2.7
- &latest_py3 3.6

jobs:
  fast_finish: true
  include:
  - stage: deploy
    if: tag IS present
    python: *latest_py3
    install: skip
    script: skip
    deploy:
      provider: pypi
      on:
        tags: true
        all_branches: true
      user: jaraco
      password:
        secure: ... # encrypt password with `travis encrypt`
      distributions: dists
      skip_cleanup: true

cache: pip

install:
- pip install tox tox-venv

before_script:
  # Disable IPv6. Ref travis-ci/travis-ci#8361
  - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
      sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
    fi
script: tox

dist: xenial
sudo: false
language: python

python:
- 2.7
- 3.6
- &latest_py3 3.7

jobs:
  fast_finish: true
  include:
  - stage: deploy
    if: tag IS present
    python: *latest_py3
    install: skip
    script: skip
    deploy:
      provider: pypi
      on:
        tags: true
        all_branches: true
      user: jaraco
      password:
        secure: ... # encrypt password with `travis encrypt`
      distributions: dists
      skip_cleanup: true

cache: pip

install:
- pip install tox tox-venv

before_script:
  # Disable IPv6. Ref travis-ci/travis-ci#8361
  - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
      sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
    fi
script: tox

Use xenial to include support for Python 3.7.
Use xenial to include support for Python 3.7.
