This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.yaml
91 lines (76 loc) · 2.26 KB
/
build.yaml
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
86
87
88
89
90
91
resources:
- repo: self
#Multi-configuration and multi-agent job options are not exported to YAML. Configure these options using documentation guidance: https://docs.microsoft.com/vsts/pipelines/process/phases
jobs:
- job: 'Static_Analysis'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: 'python env_setup.py --no_dev'
displayName: 'Prepare environment (install packages + dependencies + tools)'
- script: 'flake8 .'
displayName: 'Flake8'
- job: 'Test'
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python27:
python.version: '2.7'
Python34:
python.version: '3.4'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 5
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: 'python -m pip install --upgrade pip'
displayName: 'Update pip'
- script: 'python env_setup.py --no_dev'
displayName: 'Prepare environment (install packages + dependencies + tools)'
- script: 'python test_packages.py'
displayName: pytest
- task: PublishTestResults@2
displayName: 'Publish Test Results **/*-test-results.xml'
inputs:
testResultsFiles: '**/*-test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: always()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml'
reportDirectory: '$(Build.SourcesDirectory)/coverage'
failIfCoverageEmpty: true
- job: 'Publish'
dependsOn:
- 'Test'
- 'Static_Analysis'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: |
pip install wheel
python build_packages.py
displayName: Build source and wheel distribution for devicesdk
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact dist'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/dist
artifactName: 'dist'