-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
208 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
parameters: | ||
vmImage: | ||
|
||
jobs: | ||
- job: Package | ||
dependsOn: | ||
- Test_Primary | ||
- Test_Secondary | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: Use Python 3 latest | ||
inputs: | ||
versionSpec: '3' | ||
|
||
- bash: pip install setuptools tox wheel invoke towncrier | ||
displayName: Install dependencies | ||
|
||
- bash: invoke generate.authors | ||
displayName: Generate AUTHORS.txt | ||
|
||
- bash: invoke generate.news --yes | ||
displayName: Generate NEWS.rst | ||
|
||
- bash: tox -e packaging | ||
displayName: Run Tox packaging | ||
|
||
- bash: python setup.py sdist bdist_wheel | ||
displayName: Create sdist and wheel | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: dist' | ||
inputs: | ||
pathtoPublish: dist | ||
artifactName: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
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: | ||
- ${{ 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 | ||
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 | ||
|
||
- ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: | ||
- template: ../steps/run-tests.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
jobs: | ||
- template: jobs/test.yml | ||
parameters: | ||
vmImage: ubuntu-16.04 | ||
|
||
- template: jobs/package.yml | ||
parameters: | ||
vmImage: ubuntu-16.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
jobs: | ||
- template: jobs/test.yml | ||
parameters: | ||
vmImage: xcode9-macos10.13 | ||
|
||
- template: jobs/package.yml | ||
parameters: | ||
vmImage: xcode9-macos10.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
steps: | ||
- bash: pip install --upgrade setuptools tox | ||
displayName: Install dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
parameters: | ||
runIntegrationTests: | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: Use Python $(python.version) | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
architecture: '$(python.architecture)' | ||
|
||
- template: install-dependencies.yml | ||
|
||
- script: tox -e py -- -m unit -n 3 --junit-xml=junit/unit-test.xml | ||
displayName: Tox run unit tests | ||
|
||
- ${{ if eq(parameters.runIntegrationTests, 'true') }}: | ||
- powershell: | | ||
# Fix Git SSL errors | ||
pip install certifi tox | ||
python -m certifi > cacert.txt | ||
$env:GIT_SSL_CAINFO = $(Get-Content cacert.txt) | ||
# Shorten paths to get under MAX_PATH or else integration tests will fail | ||
# https://bugs.python.org/issue18199 | ||
subst T: $env:TEMP | ||
$env:TEMP = "T:\" | ||
$env:TMP = "T:\" | ||
tox -e py -- -m integration -n 3 --duration=5 --junit-xml=junit/integration-test.xml | ||
displayName: Tox run integration tests | ||
- task: PublishTestResults@2 | ||
displayName: Publish Test Results | ||
inputs: | ||
testResultsFiles: junit/*.xml | ||
testRunTitle: 'Python $(python.version)' | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
jobs: | ||
- template: jobs/test.yml | ||
parameters: | ||
vmImage: vs2017-win2017 | ||
|
||
- template: jobs/package.yml | ||
parameters: | ||
vmImage: vs2017-win2017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters