forked from cloud-custodian/cloud-custodian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.azure-pipelines.yml
85 lines (70 loc) · 1.96 KB
/
.azure-pipelines.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
trigger:
- master
variables:
- group: CustodianCoreCI
jobs:
- job: 'Lint'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- checkout: self
fetchDepth: 1
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
architecture: 'x64'
- script: python -m pip install --upgrade pip && pip install flake8==3.5.0
displayName: "Install Dependencies"
- script: make lint
displayName: "Flake8 Lint"
- job: 'Test'
condition: "succeeded()"
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python27:
python.version: '2.7'
TOXENV: py27-cov
Python36:
python.version: '3.6'
TOXENV: py36
Python37:
python.version: '3.7'
TOXENV: py37
maxParallel: 3
steps:
- checkout: self
fetchDepth: 2
- task: UsePythonVersion@0
displayName: "Set Python Version"
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: python -m pip install --upgrade pip && pip install tox codecov
displayName: 'Install Test Runner'
- script: tox --notest
displayName: 'Install Dependencies'
- script: tox
displayName: 'Tox'
- script: python tools/dev/cicov.py
displayName: 'Publish Code Coverage'
condition: "eq(variables['python.version'], '2.7')"
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
PR: $(system.pullRequest.pullRequestNumber)
BRANCH: $(system.pullRequest.sourceBranch)
COMMIT: $(system.pullRequest.sourceCommitId)
BUILD_ID: $(Build.BuildNumber)
BUILD_COMMIT: $(Build.SourceVersion)
BUILD_REASON: $(Build.Reason)
BUILD_BRANCH: $(Build.SourceBranchName)
- script: make sphinx
displayName: "Docs Build"
condition: "eq(variables['python.version'], '3.7')"
- task: PublishTestResults@2
displayName: "Publish Test Results Azure"
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()