azure-pipelines.yml
c433acf0
 trigger:
   branches:
     include:
     - master
 pr:
   - "*"
 
32211cd3
 jobs:
796f3e21
 - job: pytest
   strategy:
     # use cross-product when https://github.com/microsoft/azure-pipelines-yaml/issues/20 is solved
     matrix:
ecd1f588
       UbuntuPy36:
796f3e21
         python.version: '3.6'
893154e9
         vmImage: 'ubuntu-latest'
f83511ea
         tox_env: 'py36'
ecd1f588
       UbuntuPy37:
796f3e21
         python.version: '3.7'
893154e9
         vmImage: 'ubuntu-latest'
f83511ea
         tox_env: 'py37'
ecd1f588
       UbuntuPy38:
796f3e21
         python.version: '3.8'
893154e9
         vmImage: 'ubuntu-latest'
f83511ea
         tox_env: 'py38'
796f3e21
 
ecd1f588
       macOSPy36:
796f3e21
         python.version: '3.6'
893154e9
         vmImage: 'macOS-latest'
f83511ea
         tox_env: 'py36'
ecd1f588
       macOSPy37:
796f3e21
         python.version: '3.7'
893154e9
         vmImage: 'macOS-latest'
f83511ea
         tox_env: 'py37'
ecd1f588
       macOSPy38:
796f3e21
         python.version: '3.8'
893154e9
         vmImage: 'macOS-latest'
f83511ea
         tox_env: 'py38'
796f3e21
 
ecd1f588
       WindowsServerPy36:
796f3e21
         python.version: '3.6'
         vmImage: 'vs2017-win2016'
f83511ea
         tox_env: 'py36'
ecd1f588
       WindowsServerPy37:
796f3e21
         python.version: '3.7'
         vmImage: 'vs2017-win2016'
f83511ea
         tox_env: 'py37'
ecd1f588
       WindowsServerPy38:
796f3e21
         python.version: '3.8'
         vmImage: 'vs2017-win2016'
f83511ea
         tox_env: 'py38'
ecd1f588
 
       WindowsPy36:
         python.version: '3.6'
         vmImage: 'windows-latest'
         tox_env: 'py36'
       WindowsPy37:
         python.version: '3.7'
         vmImage: 'windows-latest'
         tox_env: 'py37'
       WindowsPy38:
         python.version: '3.8'
         vmImage: 'windows-latest'
         tox_env: 'py38'
 
796f3e21
   pool:
     vmImage: '$(vmImage)'
32211cd3
   steps:
c433acf0
   - task: UsePythonVersion@0
     inputs:
796f3e21
       versionSpec: '$(python.version)'
c433acf0
   - script: pip install tox
796f3e21
     displayName: Install tox
f83511ea
   - script: tox -e $(tox_env)-mindeps
     displayName: Run the tests with minimal dependencies
796f3e21
   - script: tox -e clean
     displayName: Clean
f83511ea
   - script: tox -e $(tox_env)-alldeps
796f3e21
     displayName: Run the tests
268a3aa6
 
796f3e21
 - job: coverage
32211cd3
   steps:
c433acf0
   - task: UsePythonVersion@0
     inputs:
       versionSpec: '3.7'
   - script: pip install tox
796f3e21
     displayName: Install tox
414b52bb
   - script: tox -e py37-alldeps,report
796f3e21
     displayName: Run the tests and generate coverage
11743d69
   - script: |
       pip install codecov
       codecov -t $(CODECOV_TOKEN) -f .coverage.xml
796f3e21
     displayName: Test upload coverage
268a3aa6
 
c433acf0
 - job: pre_commit
   steps:
   - task: UsePythonVersion@0
     inputs:
       versionSpec: '3.7'
   - script: pip install tox
796f3e21
     displayName: Install tox
c433acf0
   - script: tox -e pre-commit
796f3e21
     displayName: Lining tests
32211cd3
 
c433acf0
 - job: authors_check
   steps:
32211cd3
   - script: |
       MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"')
       if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi
     displayName: 'Authors check'
c1fdc8ec
     continueOnError: true