# Use Python
language: python

# Run the test runner using the same version of Python we use.
python: 3.6

# Install the test runner.
install: pip install tox

# Run each environment separately so we get errors back from all of them.
env:
  - TOX_ENV=py36
  - TOX_ENV=py35
  - TOX_ENV=py34
  - TOX_ENV=pep8
  - TOX_ENV=docs
script:
  - tox -e $TOX_ENV

# Control the branches that get built.
branches:
  only:
    - master

language: python

matrix:
  include:
    - python: 3.4
      env: TOX_ENV=py34
    - python: 3.5
      env: TOX_ENV=py35
    - python: 3.6
      env: TOX_ENV=py36
    - python: 3.6
      env: TOX_ENV=docs
    - python: 3.6
      env: TOX_ENV=pep8

install: pip install tox
script: tox -e $TOX_ENV

# Control the branches that get built.
branches:
  only:
    - master

Use a Travis CI build matrix
Use a Travis CI build matrix

In order to use both Python 3.5 and 3.6 on Travis CI, both need to be
included in the list of Python versions. This would result in the entire
build matrix being run using both versions. 3.5 jobs would fail on the
3.6 image and 3.6 jobs would fail on the 3.5 image.

While more verbose than what we had before, this build matrix allows us
to run each job with the correct version of Python.
