# Each step entry runs a task (Azure Pipelines analog of an Ansible module). # https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/?view=azure-pipelines&viewFallbackFrom=azure-devops#tool # `{script: ...}` is shorthand for `{task: CmdLine@, inputs: {script: ...}}`. # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-script?view=azure-pipelines # https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/cmd-line-v2?view=azure-pipelines steps: - task: UsePythonVersion@0 displayName: Install python inputs: versionSpec: '$(python.version)' condition: ne(variables['python.version'], '') - script: | sudo apt-get update sudo apt-get install -y python2-dev displayName: Install build deps condition: and(eq(variables['python.version'], ''), eq(variables['Agent.OS'], 'Linux')) - script: python -mpip install "tox<4.0" displayName: Install tooling - script: python -mtox -e "$(tox.env)" displayName: "Run tests" env: AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) AWS_DEFAULT_REGION: $(AWS_DEFAULT_REGION)