Created
May 9, 2020 19:40
-
-
Save gsuttie/762e8c4539444f980848b853db960509 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python example Azure Pipeline | |
trigger: | |
- azure-pipelines | |
- master | |
jobs: | |
- job: Ubuntu_testing | |
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#pool | |
pool: | |
vmImage: "ubuntu-16.04" | |
strategy: | |
matrix: | |
Python35: | |
python.version: '3.5' | |
Python36: | |
python.version: '3.6' | |
Python37: | |
python.version: '3.7' | |
steps: | |
- task: UsePythonVersion@0 | |
displayName: 'Use Python 3.6' | |
inputs: | |
versionSpec: '3.6' | |
architecture: 'x64' | |
- script: python -m pip install --upgrade pip | |
displayName: "Upgrade pip" | |
- script: | | |
# commands run within the step | |
pip install -r requirements.txt | |
displayName: 'Install dependencies' | |
- script: | | |
pip install pytest pytest-azurepipelines | |
python -m pytest tests/ | |
displayName: 'Test with pytest' | |
#- script: | | |
# python -m pip install pylint --quiet | |
# pylint boston/*.py | |
# pylint iris/*.py | |
# displayName: 'Run lint tests' | |
- job: Windows_unit_test | |
pool: | |
vmImage: 'windows-2019' | |
strategy: | |
matrix: | |
Python36: | |
python.version: '3.6' | |
Python37: | |
python.version: '3.7' | |
steps: | |
- task: UsePythonVersion@0 | |
displayName: 'Get Python version $(python.version)' | |
inputs: | |
versionSpec: '$(python.version)' | |
architecture: 'x64' | |
- script: python -m pip install --upgrade pip | |
displayName: "Upgrade pip" | |
- script: | | |
# commands run within the step | |
pip install -r requirements.txt | |
displayName: 'Install dependencies' | |
- script: | | |
pip install pytest pytest-azurepipelines | |
python -m pytest tests/ | |
displayName: 'Test with pytest' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment