Skip to content

Commit 32cb35b

Browse files
committed
Fix azure syntax
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
1 parent ffb78f5 commit 32cb35b

File tree

2 files changed

+98
-70
lines changed

2 files changed

+98
-70
lines changed
Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,34 @@
1-
parameters:
2-
pythonVersions: []
3-
vmImage: ''
4-
jobName: ''
5-
pythonArchitecture: ''
6-
7-
jobs:
8-
- job: ${{ parameters.jobName }}
9-
pool:
10-
vmImage: ${{ parameters.vmImage }}
11-
strategy:
12-
matrix:
13-
${{ each py in parameters.pythonVersions }}:
14-
python.version: ${{ py }}
15-
python.architecture: ${{ parameters.pythonArchitecture }}
16-
maxParallel: 8
17-
18-
variables:
19-
- group: CI
20-
21-
steps:
22-
- task: UsePythonVersion@0
23-
inputs:
24-
versionSpec: $(python.version)
25-
architecture: '$(python.architecture)'
26-
addToPath: true
27-
displayName: Use Python $(python.version)
28-
29-
- template: install-dependencies.yml
30-
31-
- script: |
32-
echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]'$(python.version)
33-
env:
34-
PYTHON_VERSION: $(python.version)
35-
36-
- template: create-virtualenv.yml
1+
steps:
2+
- task: UsePythonVersion@0
3+
inputs:
4+
versionSpec: $(python.version)
5+
architecture: '$(python.architecture)'
6+
addToPath: true
7+
displayName: Use Python $(python.version)
8+
9+
- template: install-dependencies.yml
10+
11+
- script: |
12+
echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]'$(python.version)
13+
env:
14+
PYTHON_VERSION: $(python.version)
15+
16+
- template: create-virtualenv.yml
17+
parameters:
18+
python_version: $(python.version)
19+
20+
- ${{ if eq(parameters.vmImage, 'windows-latest') }}:
21+
- template: run-tests-windows.yml
22+
parameters:
23+
python_version: $(python.version)
24+
- ${{ if ne(parameters.vmImage, 'windows-latest') }}:
25+
- template: run-tests-linux.yml
3726
parameters:
3827
python_version: $(python.version)
3928

40-
- ${{ if eq(parameters.vmImage, 'windows-latest') }}:
41-
- template: run-tests-windows.yml
42-
parameters:
43-
python_version: $(python.version)
44-
- ${{ if ne(parameters.vmImage, 'windows-latest') }}:
45-
- template: run-tests-linux.yml
46-
parameters:
47-
python_version: $(python.version)
48-
49-
- task: PublishTestResults@2
50-
displayName: Publish Test Results
51-
inputs:
52-
testResultsFiles: '**/test-results.xml'
53-
testRunTitle: 'Python $(python.version)'
54-
condition: succeededOrFailed()
29+
- task: PublishTestResults@2
30+
displayName: Publish Test Results
31+
inputs:
32+
testResultsFiles: '**/test-results.xml'
33+
testRunTitle: 'Python $(python.version)'
34+
condition: succeededOrFailed()

azure-pipelines.yml

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ trigger:
66
- master
77
paths:
88
exclude:
9-
- docs/
10-
- news/
11-
- peeps/
12-
- examples/
9+
- docs/*
10+
- news/*
11+
- peeps/*
12+
- examples/*
1313
- pytest.ini
1414
- README.md
1515
- pipenv/*.txt
@@ -24,12 +24,28 @@ variables:
2424
- group: CI
2525

2626
jobs:
27-
- template: .azure-pipelines/steps/run-tests.yml
28-
parameters:
29-
jobName: TestLinux
27+
- job: TestLinux
28+
pool:
3029
vmImage: 'Ubuntu-latest'
31-
pythonVersions: ["3.8", "3.7", "3.6", "3.5", "2.7"]
32-
pythonArchitecture: x64
30+
strategy:
31+
matrix:
32+
Python27:
33+
python.version: '2.7'
34+
python.architecture: x64
35+
Python36:
36+
python.version: '3.6'
37+
python.architecture: x64
38+
Python37:
39+
python.version: '3.7'
40+
python.architecture: x64
41+
Python38:
42+
python.version: '3.8'
43+
python.architecture: x64
44+
maxParallel: 8
45+
steps:
46+
- template: .azure-pipelines/steps/run-tests.yml
47+
parameters:
48+
vmImage: 'Ubuntu-latest'
3349

3450
- job: TestVendoring
3551
pool:
@@ -53,16 +69,48 @@ jobs:
5369
parameters:
5470
vmImage: 'Ubuntu-latest'
5571

56-
- template: .azure-pipelines/steps/run-tests.yml
57-
parameters:
58-
jobName: TestWindows
72+
- job: TestWindows
73+
pool:
5974
vmImage: windows-latest
60-
pythonVersions: ["3.8", "3.7", "3.6", "3.5", "2.7"]
61-
pythonArchitecture: x64
75+
strategy:
76+
matrix:
77+
Python27:
78+
python.version: '2.7'
79+
python.architecture: x64
80+
Python36:
81+
python.version: '3.6'
82+
python.architecture: x64
83+
Python37:
84+
python.version: '3.7'
85+
python.architecture: x64
86+
Python38:
87+
python.version: '3.8'
88+
python.architecture: x64
89+
maxParallel: 8
90+
steps:
91+
- template: .azure-pipelines/steps/run-tests.yml
92+
parameters:
93+
vmImage: windows-latest
6294

63-
- template: .azure-pipelines/steps/run-tests.yml
64-
parameters:
65-
jobName: TestMacOS
95+
- job: TestMacOS
96+
pool:
6697
vmImage: macOS-latest
67-
pythonVersions: ["3.8", "3.7", "3.6", "3.5", "2.7"]
68-
pythonArchitecture: x64
98+
strategy:
99+
matrix:
100+
Python27:
101+
python.version: '2.7'
102+
python.architecture: x64
103+
Python36:
104+
python.version: '3.6'
105+
python.architecture: x64
106+
Python37:
107+
python.version: '3.7'
108+
python.architecture: x64
109+
Python38:
110+
python.version: '3.8'
111+
python.architecture: x64
112+
maxParallel: 8
113+
steps:
114+
- template: .azure-pipelines/steps/run-tests.yml
115+
parameters:
116+
vmImage: macOS-latest

0 commit comments

Comments
 (0)