Skip to content

Commit 4400f21

Browse files
authored
Merge pull request #778 from microsoft/trboehre-azure-pipelines
Update ci-pr-pipeline.yml for using Python 3.6, 3.7, and 3.8
2 parents 3fa310d + 1f6f70d commit 4400f21

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

ci-pr-pipeline.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ variables:
66
COVERALLS_GIT_COMMIT: $(Build.SourceVersion)
77
COVERALLS_SERVICE_JOB_ID: $(Build.BuildId)
88
COVERALLS_SERVICE_NAME: python-ci
9-
python.version: 3.7.6
9+
python.36: 3.6.10
10+
python.37: 3.7.6
11+
python.38: 3.8.1
1012

1113

1214
jobs:
@@ -15,18 +17,26 @@ jobs:
1517
#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
1618
pool:
1719
name: Hosted Ubuntu 1604
18-
#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
19-
#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
20+
21+
strategy:
22+
matrix:
23+
Python36:
24+
PYTHON_VERSION: '$(python.36)'
25+
Python37:
26+
PYTHON_VERSION: '$(python.37)'
27+
Python38:
28+
PYTHON_VERSION: '$(python.38)'
29+
maxParallel: 3
2030

2131
steps:
2232
- powershell: |
2333
Get-ChildItem env:* | sort-object name | Format-Table -Autosize -Wrap | Out-String -Width 120
2434
displayName: 'Get environment vars'
2535
2636
- task: UsePythonVersion@0
27-
displayName: 'Use Python $(python.version)'
37+
displayName: 'Use Python $(PYTHON_VERSION)'
2838
inputs:
29-
versionSpec: '$(python.version)'
39+
versionSpec: '$(PYTHON_VERSION)'
3040

3141
- script: 'sudo ln -s /opt/hostedtoolcache/Python/3.6.9/x64/lib/libpython3.6m.so.1.0 /usr/lib/libpython3.6m.so'
3242
displayName: libpython3.6m
@@ -53,21 +63,21 @@ jobs:
5363
pip install pytest
5464
pip install pytest-cov
5565
pip install coveralls
56-
pytest --junitxml=junit/test-results.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
66+
pytest --junitxml=junit/test-results.$(PYTHON_VERSION).xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
5767
displayName: Pytest
5868
69+
- task: PublishTestResults@2
70+
displayName: 'Publish Test Results **/test-results.$(PYTHON_VERSION).xml'
71+
inputs:
72+
testResultsFiles: '**/test-results.$(PYTHON_VERSION).xml'
73+
testRunTitle: 'Python $(PYTHON_VERSION)'
74+
5975
- script: 'black --check libraries'
6076
displayName: 'Check Black compliant'
6177

6278
- script: 'pylint --rcfile=.pylintrc libraries'
6379
displayName: Pylint
6480

65-
- task: PublishTestResults@2
66-
displayName: 'Publish Test Results **/test-results.xml'
67-
inputs:
68-
testResultsFiles: '**/test-results.xml'
69-
testRunTitle: 'Python $(python.version)'
70-
7181
- script: 'COVERALLS_REPO_TOKEN=$(COVERALLS_TOKEN) coveralls'
7282
displayName: 'Push test results to coveralls https://coveralls.io/github/microsoft/botbuilder-python'
7383
continueOnError: true

0 commit comments

Comments
 (0)