language: python
python:
  - 2.7
  - 3.3
  - 3.4
  - pypy
install: travis_retry pip install 'requests>=2.9,<2.10' $DJANGO_VERSION
env:
  global:
    - PYTHONWARNINGS=all DJANGO_SETTINGS_MODULE=tests.django_settings
  matrix:
    - DJANGO_VERSION='Django>=1.8,<1.9'
    - DJANGO_VERSION='Django>=1.9,<1.10'
matrix:
  include:
    - python: 3.5
      env: DJANGO_VERSION='Django>=1.8,<1.9'
    - python: 3.5
      env: DJANGO_VERSION='Django>=1.9,<1.10'
  exclude:
    - python: 3.3
      env: DJANGO_VERSION='Django>=1.9,<1.10'

  fast_finish: true
script: python -m unittest discover

# Use the faster container-based infrastructure.
sudo: false
language: python
python:
  - 2.7
  - 3.3
  - 3.4
  - pypy
install: travis_retry pip install 'requests>=2.9,<2.10' $DJANGO_VERSION
env:
  global:
    - PYTHONWARNINGS=all DJANGO_SETTINGS_MODULE=tests.django_settings
  matrix:
    - DJANGO_VERSION='Django>=1.8,<1.9'
    - DJANGO_VERSION='Django>=1.9,<1.10'
matrix:
  include:
    - python: 3.5
      env: DJANGO_VERSION='Django>=1.8,<1.9'
    - python: 3.5
      env: DJANGO_VERSION='Django>=1.9,<1.10'
  exclude:
    - python: 3.3
      env: DJANGO_VERSION='Django>=1.9,<1.10'

  fast_finish: true
script: python -m unittest discover

Switch to the faster container-based Travis infrastructure
Switch to the faster container-based Travis infrastructure

By declaring that the tests do not require sudo, Travis can run the test
jobs on their newer/faster container-based infrastructure:
https://docs.travis-ci.com/user/migrating-from-legacy/

(Notably the builds start within seconds rather than needing to wait for
the VMs to be spun up before the test run even starts)
