Update ci-pr-pipeline.yml for Azure Pipelines
Run pytest using Python 3.6, 3.7, and 3.8
@@ -6,7 +6,10 @@ variables:
COVERALLS_GIT_COMMIT: $(Build.SourceVersion)
COVERALLS_SERVICE_JOB_ID: $(Build.BuildId)
COVERALLS_SERVICE_NAME: python-ci
- python.version: 3.7.6
+ python.36: 3.6.9
+ python.37: 3.7.6
+ pythin.38: 3.8.1
+ python.version: $(python.37)
jobs:
@@ -53,8 +56,39 @@ jobs:
pip install pytest
pip install pytest-cov
pip install coveralls
- pytest --junitxml=junit/test-results.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
- displayName: Pytest
+ displayName: PyTest
+
+ - task: UsePythonVersion@0
+ displayName: 'Use Python $(python.36)'
+ inputs:
+ versionSpec: '$(python.36)'
+
+ - script:
+ pytest --junitxml=junit/test-results.36.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
+ displayName: Pytest.36
+
+ - task: UsePythonVersion@0
+ displayName: 'Use Python $(python.37)'
+ inputs:
+ versionSpec: '$(python.37)'
+
+ - script:
+ pytest --junitxml=junit/test-results.37.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
+ displayName: Pytest.37
+
+ - task: UsePythonVersion@0
+ displayName: 'Use Python $(python.38)'
+ inputs:
+ versionSpec: '$(python.38)'
+
+ - script:
+ pytest --junitxml=junit/test-results.38.xml --cov-config=.coveragerc --cov --cov-report=xml --cov-report=html
+ displayName: Pytest.38
+
+ - task: UsePythonVersion@0
+ displayName: 'Use Python $(python.version)'
+ inputs:
+ versionSpec: '$(python.version)'
- script: 'black --check libraries'
displayName: 'Check Black compliant'
@@ -65,7 +99,7 @@ jobs:
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-results.xml'
inputs:
- testResultsFiles: '**/test-results.xml'
+ testResultsFiles: '**/test-results*.xml'
testRunTitle: 'Python $(python.version)'
- script: 'COVERALLS_REPO_TOKEN=$(COVERALLS_TOKEN) coveralls'
