forked from Azure/aztk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci.yml
54 lines (46 loc) · 1.51 KB
/
.vsts-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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