aztk/.vsts-ci.yml

55 строки
1.5 KiB
YAML

name: $(Build.SourceBranch)$(Rev:.r)
trigger:
- master
jobs:
- job: Test
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6 >= 3.5'
addToPath: true
architecture: 'x64'
- script: |
pip install -r requirements.txt
pip install -e .
condition: succeeded()
displayName: install aztk
- script: |
yapf --style .style.yapf -dpr aztk/ aztk_cli/
condition: succeeded()
displayName: yapf
- script: |
pylint --jobs 2 --errors-only aztk aztk_cli
condition: succeeded()
displayName: pylint error check
- script: |
pytest --ignore=tests/integration_tests
condition: succeeded()
displayName: unit tests
- script: |
export BATCH_ACCOUNT_RESOURCE_ID=$(BATCH_ACCOUNT_RESOURCE_ID)
export CLIENT_ID=$(CLIENT_ID)
export CREDENTIAL=$(CREDENTIAL)
export ID_RSA="$(ID_RSA)"
export ID_RSA_PUB="$(ID_RSA_PUB)"
export STORAGE_ACCOUNT_RESOURCE_ID=$(STORAGE_ACCOUNT_RESOURCE_ID)
export TENANT_ID=$(TENANT_ID)
pytest --numprocesses=70 tests/integration_tests
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranchName'], 'release'), eq(variables['Build.SourceBranchName'], 'master')))
displayName: integration tests
- script: |
pylint --jobs 2 --disable=fixme aztk aztk_cli
continueOnError: true
condition: succeeded()
displayName: pylint report