Skip to content

Commit f8b7396

Browse files
committed
Tests
1 parent cfa2380 commit f8b7396

File tree

2 files changed

+64
-56
lines changed

2 files changed

+64
-56
lines changed

azure-pipelines-templates/run-tests.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,45 @@
2828

2929
# This is the list of parameters for this template and their default values.
3030
parameters:
31-
name: ''
32-
vm_image: ''
31+
# name: ''
32+
# vm_image: ''
3333
python_version: ''
3434

35-
jobs:
36-
# The job will be named after the OS and Azure will suffix the strategy to make it unique
37-
# so we'll have a job name "Windows Python 3.9" for example. What's a strategy? Strategies are the
38-
# name of the keys under the strategy.matrix scope. So for each OS we'll have "<OS> Python 3.9" and
39-
# "<OS> Python 3.10".
40-
- job:
41-
strategy:
42-
parallel: 3
43-
displayName: ${{ parameters.name }}
44-
pool:
45-
vmImage: ${{ parameters.vm_image }}
35+
# jobs:
36+
# # The job will be named after the OS and Azure will suffix the strategy to make it unique
37+
# # so we'll have a job name "Windows Python 3.9" for example. What's a strategy? Strategies are the
38+
# # name of the keys under the strategy.matrix scope. So for each OS we'll have "<OS> Python 3.9" and
39+
# # "<OS> Python 3.10".
40+
# - job:
41+
# strategy:
42+
# parallel: 3
43+
# displayName: ${{ parameters.name }}
44+
# pool:
45+
# vmImage: ${{ parameters.vm_image }}
4646

47-
variables:
48-
group: sg-credentials
47+
# variables:
48+
# group: sg-credentials
4949

50-
# These are the steps that will be executed inside each job.
51-
steps:
52-
# Specifies which version of Python we want to use. That's where the strategy comes in.
53-
# Each job will share this set of steps, but each of them will receive a different
54-
# $(python.version)
55-
# TODO: We should provide `githubToken` if we want to download a python release.
56-
# Otherwise we may hit the GitHub anonymous download limit.
57-
- task: UsePythonVersion@0
58-
inputs:
59-
versionSpec: ${{ parameters.python_version }}
6050

61-
# Install all dependencies needed for running the tests. This command is good
62-
# for all OSes
63-
- task: Bash@3
64-
displayName: Install dependencies
65-
inputs:
66-
targetType: inline
67-
script: |
68-
python --version
69-
python -c "import sys; print(sys.platform)"
51+
steps:
52+
# Specifies which version of Python we want to use. That's where the strategy comes in.
53+
# Each job will share this set of steps, but each of them will receive a different
54+
# $(python.version)
55+
# TODO: We should provide `githubToken` if we want to download a python release.
56+
# Otherwise we may hit the GitHub anonymous download limit.
57+
- task: UsePythonVersion@0
58+
inputs:
59+
versionSpec: ${{ parameters.python_version }}
60+
61+
# Install all dependencies needed for running the tests. This command is good
62+
# for all OSes
63+
- task: Bash@3
64+
displayName: Install dependencies
65+
inputs:
66+
targetType: inline
67+
script: |
68+
python --version
69+
python -c "import sys; print(sys.platform)"
7070
7171
# pip install --upgrade pip
7272
# pip install --upgrade setuptools wheel

azure-pipelines.yml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,38 @@ jobs:
9191

9292
- template: azure-pipelines-templates/type_checking.yml
9393

94-
- ${{ each os_version in parameters.os_versions }}:
95-
- ${{ each python_version in parameters.python_versions }}:
94+
# - ${{ each os_version in parameters.os_versions }}:
95+
# - ${{ each python_version in parameters.python_versions }}:
96+
# - template: azure-pipelines-templates/run-tests.yml
97+
# parameters:
98+
# name: "${{ os_version.name }} Python ${{ python_version }}"
99+
# vm_image: ${{ os_version.vm_image }}
100+
# python_version: ${{ python_version }}
101+
102+
- job:
103+
strategy:
104+
matrix:
105+
${{ each python_version in parameters.python_versions }}:
106+
${{ each os_version in parameters.os_versions }}:
107+
"Run Tests ${{ os_version.name }} Python ${{ python_version }}":
108+
imageName: '${{ os_version.vm_image }}'
109+
python.version: '${{ python_version }}'
110+
111+
maxParallel: 3
112+
# limiting the parallel jobs to 3 to avoid race condition issues between tests..... :(
113+
114+
pool:
115+
vmImage: $(imageName)
116+
117+
variables:
118+
group: sg-credentials
119+
120+
steps:
96121
- template: azure-pipelines-templates/run-tests.yml
97122
parameters:
98-
name: "${{ os_version.name }} Python ${{ python_version }}"
99-
vm_image: ${{ os_version.vm_image }}
100-
python_version: ${{ python_version }}
101-
102-
# - job: ## "Run_tests" ## I don't have to ...
103-
# strategy:
104-
# matrix:
105-
# ${{ each python_version in parameters.python_versions }}:
106-
# ${{ each os_version in parameters.os_versions }}:
107-
# "Run Tests ${{ os_version.name }} Python ${{ python_version }}":
108-
# imageName: '${{ os_version.vm_image }}'
109-
# python.version: '${{ python_version }}'
110-
111-
# maxParallel: 3
112-
# # limiting the parallel jobs to 3 to avoid race condition issues between tests..... :(
113-
114-
# # displayName: "Run tests_$( imageName )_$( python.version )"
115-
# pool:
116-
# vmImage: $(imageName)
117-
# steps:
123+
python_version: $(python.version)
124+
125+
118126
# - task: UsePythonVersion@0
119127
# inputs:
120128
# versionSpec: $(python.version)

0 commit comments

Comments
 (0)