# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'
strategy:
  matrix:
    Python27:
      python.version: '2.7'
      TOXENV: ansible{28,27,26,devel}
    Python35:
      python.version: '3.5'
      TOXENV: ansible{28,27,26,devel}
    Python36:
      python.version: '3.6'
      TOXENV: ansible{28,27,26,devel}
    Python37:
      python.version: '3.7'
      TOXENV: ansible{28,27,26,devel}

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '$(python.version)'
  displayName: 'Use Python $(python.version)'

- script: |
    python -m pip install --upgrade tox
    python -m tox --parallel auto --notest
    for py_exe in `ls .tox/*/bin/python`
    do
        $py_exe -m pip install pytest pytest-azurepipelines
    done
  displayName: 'Install dependencies using tox'

- script: |
    python -m tox --parallel 0
  displayName: 'Run test suite via tox'

# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'
strategy:
  matrix:
    Python27:
      python.version: '2.7'
      TOXENV: ansible{28,27,26,devel}
    Python35:
      python.version: '3.5'
      TOXENV: ansible{28,27,26,devel}
    Python36:
      python.version: '3.6'
      TOXENV: ansible{28,27,26,devel}
    Python37:
      python.version: '3.7'
      TOXENV: ansible{28,27,26,devel}

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '$(python.version)'
  displayName: 'Use Python $(python.version)'

- script: |
    python -m pip install --upgrade setuptools tox
    python -m tox --parallel auto --notest
    for py_exe in `ls .tox/*/bin/python`
    do
        $py_exe -m pip install pytest pytest-azurepipelines
    done
  displayName: 'Install dependencies using tox'

- script: |
    python -m tox --parallel 0
  displayName: 'Run test suite via tox'

Upgrade setuptools in Azure Pipelines
Upgrade setuptools in Azure Pipelines
