mirror of https://github.com/pypa/pip
Get rid of branching logic based on image name
This commit is contained in:
parent
7a612ee9d8
commit
fe76e4f80e
|
@ -0,0 +1,65 @@
|
|||
parameters:
|
||||
vmImage:
|
||||
|
||||
jobs:
|
||||
- job: Test_Primary
|
||||
displayName: Test Primary
|
||||
|
||||
pool:
|
||||
vmImage: ${{ parameters.vmImage }}
|
||||
strategy:
|
||||
matrix:
|
||||
Python27:
|
||||
python.version: '2.7'
|
||||
python.architecture: x64
|
||||
Python36:
|
||||
python.version: '3.6'
|
||||
python.architecture: x64
|
||||
maxParallel: 2
|
||||
|
||||
steps:
|
||||
- template: ../steps/run-tests-windows.yml
|
||||
parameters:
|
||||
runIntegrationTests: true
|
||||
|
||||
- job: Test_Secondary
|
||||
displayName: Test Secondary
|
||||
# Don't run integration tests for these runs
|
||||
# Run after Test_Primary so we don't devour time and jobs if tests are going to fail
|
||||
dependsOn: Test_Primary
|
||||
|
||||
pool:
|
||||
vmImage: ${{ parameters.vmImage }}
|
||||
strategy:
|
||||
matrix:
|
||||
Python34:
|
||||
python.version: '3.4'
|
||||
python.architecture: x64
|
||||
Python35:
|
||||
python.version: '3.5'
|
||||
python.architecture: x64
|
||||
Python37:
|
||||
python.version: '3.7'
|
||||
python.architecture: x64
|
||||
# This is for Windows, so test x86 builds
|
||||
Python27-x86:
|
||||
python.version: '2.7'
|
||||
python.architecture: x86
|
||||
Python34-x86:
|
||||
python.version: '3.4'
|
||||
python.architecture: x86
|
||||
Python35-x86:
|
||||
python.version: '3.5'
|
||||
python.architecture: x86
|
||||
Python36-x86:
|
||||
python.version: '3.6'
|
||||
python.architecture: x86
|
||||
Python37-x86:
|
||||
python.version: '3.7'
|
||||
python.architecture: x86
|
||||
maxParallel: 5
|
||||
|
||||
steps:
|
||||
- template: ../steps/run-tests-windows.yml
|
||||
parameters:
|
||||
runIntegrationTests: false
|
|
@ -2,8 +2,8 @@ parameters:
|
|||
vmImage:
|
||||
|
||||
jobs:
|
||||
- job: Test_Primary
|
||||
displayName: Test Primary
|
||||
- job: Test
|
||||
displayName: Test
|
||||
|
||||
pool:
|
||||
vmImage: ${{ parameters.vmImage }}
|
||||
|
@ -12,62 +12,41 @@ jobs:
|
|||
Python27:
|
||||
python.version: '2.7'
|
||||
python.architecture: x64
|
||||
Python36:
|
||||
python.version: '3.6'
|
||||
python.architecture: x64
|
||||
maxParallel: 2
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}:
|
||||
- template: ../steps/run-tests-windows.yml
|
||||
parameters:
|
||||
runIntegrationTests: true
|
||||
|
||||
- ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}:
|
||||
- template: ../steps/run-tests.yml
|
||||
|
||||
- job: Test_Secondary
|
||||
displayName: Test Secondary
|
||||
# Run after Test_Primary so we don't devour time and jobs if tests are going to fail
|
||||
dependsOn: Test_Primary
|
||||
|
||||
pool:
|
||||
vmImage: ${{ parameters.vmImage }}
|
||||
strategy:
|
||||
matrix:
|
||||
Python34:
|
||||
python.version: '3.4'
|
||||
python.architecture: x64
|
||||
Python35:
|
||||
python.version: '3.5'
|
||||
python.architecture: x64
|
||||
Python36:
|
||||
python.version: '3.6'
|
||||
python.architecture: x64
|
||||
Python37:
|
||||
python.version: '3.7'
|
||||
python.architecture: x64
|
||||
# On Windows, test x86 builds
|
||||
${{ if eq(parameters.vmImage, 'vs2017-win2017') }}:
|
||||
Python27-x86:
|
||||
python.version: '2.7'
|
||||
python.architecture: x86
|
||||
Python34-x86:
|
||||
python.version: '3.4'
|
||||
python.architecture: x86
|
||||
Python35-x86:
|
||||
python.version: '3.5'
|
||||
python.architecture: x86
|
||||
Python36-x86:
|
||||
python.version: '3.6'
|
||||
python.architecture: x86
|
||||
Python37-x86:
|
||||
python.version: '3.7'
|
||||
python.architecture: x86
|
||||
maxParallel: 5
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}:
|
||||
- template: ../steps/run-tests-windows.yml
|
||||
parameters:
|
||||
runIntegrationTests: false
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Use Python $(python.version)
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
||||
- ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}:
|
||||
- template: ../steps/run-tests.yml
|
||||
- template: install-dependencies.yml
|
||||
|
||||
- script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml
|
||||
displayName: Tox run unit tests
|
||||
|
||||
# Run integration tests in two groups so we will fail faster if there is a failure in the first group
|
||||
- script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml
|
||||
displayName: Tox run Group 0 integration tests
|
||||
|
||||
- script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml
|
||||
displayName: Tox run Group 1 integration tests
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Test Results
|
||||
inputs:
|
||||
testResultsFiles: junit/*.xml
|
||||
testRunTitle: 'Python $(python.version)'
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
steps:
|
||||
- bash: pip install --upgrade setuptools tox
|
||||
displayName: Install dependencies
|
||||
displayName: Install Tox
|
|
@ -1,24 +0,0 @@
|
|||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Use Python $(python.version)
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
||||
- template: install-dependencies.yml
|
||||
|
||||
- script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml
|
||||
displayName: Tox run unit tests
|
||||
|
||||
# Run integration tests in two groups so we will fail faster if there is a failure in the first group
|
||||
- script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml
|
||||
displayName: Tox run Group 0 integration tests
|
||||
|
||||
- script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml
|
||||
displayName: Tox run Group 1 integration tests
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Test Results
|
||||
inputs:
|
||||
testResultsFiles: junit/*.xml
|
||||
testRunTitle: 'Python $(python.version)'
|
||||
condition: succeededOrFailed()
|
Loading…
Reference in New Issue