sudo: false
language: python
cache:
  directories:
  - "~/.cache/pip"
python:
- '2.7'
- '3.6'
- '3.5'
env:
- DJANGO=2.0
- DJANGO=2.1
- DJANGO=1.11
- DJANGO=master
matrix:
  exclude:
  - python: '2.7'
    env: DJANGO=master
  - python: '2.7'
    env: DJANGO=2.0
  - python: '2.7'
    env: DJANGO=2.1
  - python: '3.6'
    env: DJANGO=1.11
  allow_failures:
  - python: '3.5'
    env: DJANGO=master
  - python: '3.6'
    env: DJANGO=master
  
install:
- pip install tox
script:
- tox -e py${TRAVIS_PYTHON_VERSION//[.]/}-$DJANGO
deploy:
  provider: pypi
  user: jazzband
  distributions: sdist bdist_wheel
  password:
    secure: UQh5R++1zOsJm31oIL0w4YsIyP1A83kv/EdpwhuXqs8HZB+Mpo5h2ylu/qVioTaiXvYEVfO1myY57du7YvC+u6oOxD8tyduBOyZMJXa15+/kdVbvjlRWJ/c8wGgmjlOAun209g9WoTAMVX8t1+thHEJqWxx07nlnPCAJSmdms+w=
  on:
    tags: true
    repo: jazzband/django-admin2
    # only do the PyPI release for exactly one scenario of the test matrix:
    condition: "$DJANGO = 1.11"
    python: 2.7
