8000 Update ci-pr-pipeline.yml for Azure Pipelines · TheCompuGuru/botbuilder-python@463bdc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 463bdc7

Browse files
committed
Update ci-pr-pipeline.yml for Azure Pipelines
1 parent a7d5169 commit 463bdc7

File tree

1 file changed

+17
-56
lines changed

1 file changed

+17
-56
lines changed

ci-pr-pipeline.yml

Lines changed: 17 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ variables:
99
python.36: 3.6.10
1010
python.37: 3.7.6
1111
python.38: 3.8.1
12-
python.version: $(python.37)
1312

1413

1514
jobs:
@@ -18,18 +17,26 @@ jobs:
1817
#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
1918
pool:
2019
name: Hosted Ubuntu 1604
21-
#Your build pipeline references the ‘python.version’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
22-
#Your build pipeline references the ‘python.version’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
2320

2421
steps:
2522
- powershell: |
2623
Get-ChildItem env:* | sort-object name | Format-Table -Autosize -Wrap | Out-String -Width 120
2724
displayName: 'Get environment vars'
2825
26+
strategy:
27+
matrix:
28+
Python35:
29+
PYTHON_VERSION: '$(python.36)'
30+
Python36:
31+
PYTHON_VERSION: '$(python.37)'
32+
Python37:
33+
PYTHON_VERSION: '$(python.38)'
34+
maxParallel: 2
35+
2936
- task: UsePythonVersion@0
30-
displayName: 'Use Python $(python.version)'
37+
displayName: 'Use Python $(PYTHON_VERSION)'
3138
inputs:
32-
versionSpec: '$(python.version)'
39+
versionSpec: '$(PYTHON_VERSION)'
3340

3441
- script: 'sudo ln -s /opt/hostedtoolcache/Python/3.6.9/x64/lib/libpython3.6m.so.1.0 /usr/lib/libpython3.6m.so'
3542
displayName: libpython3.6m
@@ -52,64 +59,18 @@ jobs:
5259
pip install black
5360
displayName: 'Install dependencies'
5461
55-
- task: UsePythonVersion@0
56-
displayName: 'Use Python $(python.36)'
57-
inputs:
58-
versionSpec: '$(python.36)'
59-
60-
- script:
61-
pip install pytest
62-
pip install pytest-cov
63-
pip install coveralls
64-
python -m pytest --junitxml=junit/test-results.36.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
65-
displayName: Pytest.36
66-
67-
- task: PublishTestResults@2
68-
displayName: 'Publish Test Results **/test-results.36.xml'
69-
inputs:
70-
testResultsFiles: '**/test-results.36.xml'
71-
testRunTitle: 'Python $(python.36)'
72-
73-
- task: UsePythonVersion@0
74-
displayName: 'Use Python $(python.37)'
75-
inputs:
76-
versionSpec: '$(python.37)'
77-
7862
- script:
7963
pip install pytest
8064
pip install pytest-cov
8165
pip install coveralls
82-
python -m pytest --junitxml=junit/test-results.37.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
83-
displayName: Pytest.37
66+
python -m pytest --junitxml=junit/test-results.$(PYTHON_VERSION).xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
67+
displayName: Pytest
8468

8569
- task: PublishTestResults@2
86-
displayName: 'Publish Test Results **/test-results.37.xml'
87-
inputs:
88-
testResultsFiles: '**/test-results.37.xml'
89-
testRunTitle: 'Python $(python.37)'
90-
91-
- task: UsePythonVersion@0
92-
displayName: 'Use Python $(python.38)'
93-
inputs:
94-
versionSpec: '$(python.38)'
95-
96-
- script:
97-
pip install pytest
98-
pip install pytest-cov
99-
pip install coveralls
100-
python -m pytest --junitxml=junit/test-results.38.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
101-
displayName: Pytest.38
102-
103-
- task: PublishTestResults@2
104-
displayName: 'Publish Test Results **/test-results.38.xml'
105-
inputs:
106-
testResultsFiles: '**/test-results.38.xml'
107-
testRunTitle: 'Python $(python.38)'
108-
109-
- task: UsePythonVersion@0
110-
displayName: 'Use Python $(python.version)'
70+
displayName: 'Publish Test Results **/test-results.$(PYTHON_VERSION).xml'
11171
inputs:
112-
versionSpec: '$(python.version)'
72+
testResultsFiles: '**/test-results.$(PYTHON_VERSION).xml'
73+
testRunTitle: 'Python $(PYTHON_VERSION)'
11374

11475
- script: 'black --check libraries'
11576
displayName: 'Check Black compliant'

0 commit comments

Comments
 (0)
0