You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# 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@<mumble>, 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:
|
|
githubToken: '$(GITHUB_PYVER_TOKEN)'
|
|
versionSpec: '$(python.version)'
|
|
condition: ne(variables['python.version'], '')
|
|
|
|
- script: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python2-dev python3-pip virtualenv
|
|
displayName: Install build deps
|
|
condition: and(eq(variables['python.version'], ''), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
- script: |
|
|
type python && python --version
|
|
type python2 && python2 --version
|
|
type python3 && python3 --version
|
|
displayName: Show python versions
|
|
|
|
- script: |
|
|
if [[ $(uname) == "Darwin" ]]; then
|
|
python2 -m ensurepip --user --altinstall --no-default-pip
|
|
python2 -m pip install --user "tox<4.0"
|
|
else
|
|
python -m pip install "tox<4.0"
|
|
fi
|
|
displayName: Install tooling
|
|
|
|
- script: |
|
|
if [[ $(uname) == "Darwin" ]]; then
|
|
python2 -m tox -e "$(tox.env)"
|
|
else
|
|
python -m tox -e "$(tox.env)"
|
|
fi
|
|
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)
|