---
trigger:
  - master

pr:
  - master

jobs:
  - job: 'Test'
    pool:
      vmImage: 'ubuntu-latest'
    strategy:
      matrix:
        black:
          python.version: '3.7'
          tox.env: black
        isort:
          python.version: '3.7'
          tox.env: isort
        flake8:
          python.version: '3.7'
          tox.env: flake8
        py35:
          python.version: '3.5'
          tox.env: py35-django111,py35-django20,py35-django21,py35-django22
        py36:
          python.version: '3.6'
          tox.env: py36-django111,py36-django20,py36-django21,py36-django22
        py37:
          python.version: '3.7'
          tox.env: py37-django111,py37-django20,py37-django21,py37-django22

    steps:
      - task: UsePythonVersion@0
        displayName: Get Python for Python tools.
        inputs:
          versionSpec: '3.7'
          addToPath: false
        name: pyTools

      - script: $(pyTools.pythonLocation)/bin/pip install --upgrade tox
        displayName: Install Python-based tools.

      - task: UsePythonVersion@0
        inputs:
          versionSpec: '$(python.version)'
          architecture: 'x64'
        displayName: Use cached Python $(python.version) for tests.

      - script: $(pyTools.pythonLocation)/bin/tox -e $(tox.env)
        displayName: run tox -e $(tox.env)

Set up CI with Azure Pipelines.
Set up CI with Azure Pipelines.
