language: python
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"

install:
  - pip install -e .
  - pip install $DJANGO || pip install --pre $DJANGO
  - pip install -r requirements-dev.txt
  - if [ -z ${DRF+x} ]; then echo "no drf"; else pip install djangorestframework; fi
script:
  - flake8 . --ignore=E501,E402
  - coverage run --source=test_plus setup.py test
after_success:
  - coveralls
env:
  - DJANGO="Django<1.9"
  - DJANGO="Django<1.10"
  - DJANGO="Django<1.11"
  - DJANGO="Django<1.12"
  - DJANGO="Django>=2.0a1,<2.1"

  - DJANGO="Django<1.9" DRF=1
  - DJANGO="Django<1.10" DRF=1
  - DJANGO="Django<1.11" DRF=1
  - DJANGO="Django<1.12" DRF=1
  - DJANGO="Django>=2.0a1,<2.1" DRF=1

matrix:
  exclude:
    # Django>=2.0 doesn't support Python 2.7
    - python: "2.7"
      env: DJANGO=">=2.0a1,<2.1"

language: python
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"

install:
  - pip install tox-travis
  - pip install -r requirements-dev.txt
script:
  - flake8 . --ignore=E501,E402
  - tox
after_success:
  - coveralls

Switch to use tox in the build pipeline.
Switch to use tox in the build pipeline.

Sure, we get fewer dimensions, but tox handles all the virtualenv
creation and it's nice to test in CI the same way developers run the
tests themselves.

Avoids duplication and additional maintenance too.
