azure-pipelines/analyse-and-test.yml
# Azure Pipeline for Build and Release a Python package.
#
# This pipeline performs multiple actions to ensure the quality of the package:
# - Performs static analysis and runs test on multiple Python versions and host platforms.
# - Uploads test coverage to Code Climate
# Trigger on a PR to master, beta or releases branches.
pr:
- master
- beta
- releases/*
stages:
- stage: AnalyseTest
displayName: 'Analyse and Test'
jobs:
- job: Test
strategy:
maxParallel: 10
matrix:
Assert_news:
python.version: '3.7'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: checknews
Linting_Py_3_7:
python.version: '3.7'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: linting
Linting_Py_3_8:
python.version: '3.8'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: linting
Linting_Py_3_9:
python.version: '3.9'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: linting
Linux_Py_3_7:
python.version: '3.7'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: py37
Linux_Py_3_8:
python.version: '3.8'
vmImageName: ubuntu-latest
uploadCoverage: "false"
tox.env: py38
Linux_Py_3_9:
python.version: '3.9'
vmImageName: ubuntu-latest
uploadCoverage: "true"
tox.env: py39
Windows_Py_3_7:
python.version: '3.7'
vmImageName: windows-latest
uploadCoverage: "false"
tox.env: py37
Windows_Py_3_8:
python.version: '3.8'
vmImageName: windows-latest
uploadCoverage: "false"
tox.env: py38
Windows_Py_3_9:
python.version: '3.9'
vmImageName: windows-latest
uploadCoverage: "true"
tox.env: py39
macOS_Py_3_7:
python.version: '3.7'
vmImageName: macOS-latest
uploadCoverage: "false"
tox.env: py37
macOS_Py_3_8:
python.version: '3.8'
vmImageName: macOS-latest
uploadCoverage: "false"
tox.env: py38
macOS_Py_3_9:
python.version: '3.9'
vmImageName: macOS-latest
uploadCoverage: "true"
tox.env: py39
pool:
vmImage: $(vmImageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade tox
tox -e $(tox.env)
displayName: run tox -e $(tox.env)
- template: steps/publish-code-coverage-results.yml