forked from pypa/virtualenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
122 lines (108 loc) · 3.53 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
variables:
"System.PreferGit": true
PYTEST_ADDOPTS: "-vv -ra --showlocals"
trigger:
batch: true
branches:
include:
- master
- refs/tags/*
paths:
exclude:
- LICENSE.txt
- HOWTORELEASE.rst
- AUTHORS.txt
- CONTRIBUTING.rst
- .gitignore
- .github/*
jobs:
- template: azure-run-tox-env.yml
parameters: {tox: fix_lint, python: 3.7}
- template: azure-run-tox-env.yml
parameters: {tox: embed, python: 3.7}
- template: azure-run-tox-env.yml
parameters: {tox: docs, python: 3.7}
- template: azure-run-tox-env.yml
parameters: {tox: package_readme, python: 3.7}
- template: azure-run-tox-env.yml
parameters: {tox: pypy, python: pypy, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: pypy3, python: pypy3, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py37, python: 3.7, os: windows}
- template: azure-run-tox-env.yml
parameters: {tox: py36, python: 3.6, os: windows}
- template: azure-run-tox-env.yml
parameters: {tox: py35, python: 3.5, os: windows}
- template: azure-run-tox-env.yml
parameters: {tox: py34, python: 3.4, os: windows}
- template: azure-run-tox-env.yml
parameters: {tox: py27, python: 2.7, os: windows}
- template: azure-run-tox-env.yml
parameters: {tox: py37, python: 3.7, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py36, python: 3.6, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py35, python: 3.5, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py34, python: 3.4, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py27, python: 2.7, os: linux}
- template: azure-run-tox-env.yml
parameters: {tox: py36, python: 3.6, os: macOs}
- template: azure-run-tox-env.yml
parameters: {tox: py27, python: 2.7, os: macOs}
- job: report_coverage
pool: {vmImage: 'Ubuntu 16.04'}
condition: eq(variables['system.pullrequest.isfork'], false)
dependsOn:
- windows_py37
- windows_py36
- windows_py35
- windows_py34
- windows_py27
- linux_py37
- linux_py36
- linux_py35
- linux_py34
- linux_py27
- linux_pypy3
- linux_pypy
- macOS_py36
- macOS_py27
steps:
- task: DownloadBuildArtifacts@0
displayName: download coverage files for run
inputs:
buildType: current
downloadType: specific
itemPattern: coverage-*/*
downloadPath: $(Build.StagingDirectory)
- task: UsePythonVersion@0
displayName: setup python
inputs:
versionSpec: 3.7
- script: |
python -c '
from pathlib import Path
import shutil
from_folder = Path("$(Build.StagingDirectory)")
destination_folder = Path("$(System.DefaultWorkingDirectory)") / ".tox"
destination_folder.mkdir()
for coverage_file in from_folder.glob("*/.coverage"):
destination = destination_folder / f".coverage.{coverage_file.parent.name[9:]}"
print(f"{coverage_file} copy to {destination}")
shutil.copy(str(coverage_file), str(destination))'
displayName: move coverage files into .tox
- script: 'python -m pip install -U tox --pre'
displayName: install tox
- script: 'python -m tox -e coverage'
displayName: create coverag report via tox
- task: PublishCodeCoverageResults@1
displayName: publish overall coverage report to Azure
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/.tox/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/.tox/htmlcov'
failIfCoverageEmpty: true