This repository has been archived by the owner on Dec 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from tubone24/azure-pipelines
Set up CI with Azure Pipelines
- Loading branch information
Showing
1 changed file
with
79 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,79 @@ | ||
# Python package | ||
# Create and test a Python package on multiple Python versions. | ||
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/python | ||
|
||
trigger: | ||
- master | ||
|
||
jobs: | ||
|
||
- job: 'Test' | ||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
steps: | ||
- script: echo Ubuntu-16.04 | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
architecture: 'x64' | ||
- script: python -m pip install --upgrade pip && pip install -r requirements.txt && pip install -r requirements-test.txt | ||
displayName: 'Install dependencies' | ||
|
||
- script: | | ||
pytest --it --junit-xml=test_results.xml | ||
displayName: 'pytest' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: 'test_results.xml' | ||
testRunTitle: 'Python $(python.version)' | ||
condition: succeededOrFailed() | ||
|
||
strategy: | ||
matrix: | ||
Python36: | ||
python.version: '3.6' | ||
maxParallel: 4 | ||
|
||
- job: macOS | ||
pool: | ||
vmImage: 'macOS-10.13' | ||
steps: | ||
- script: echo MacOSX | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
architecture: 'x64' | ||
- script: python -m pip install --upgrade pip && pip install -r requirements.txt && pip install -r requirements-test.txt | ||
displayName: 'Install dependencies' | ||
|
||
- script: | | ||
pytest --it --junit-xml=test_results.xml | ||
displayName: 'pytest' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: 'test_results.xml' | ||
testRunTitle: 'Python $(python.version)' | ||
condition: succeededOrFailed() | ||
|
||
strategy: | ||
matrix: | ||
Python36: | ||
python.version: '3.6' | ||
maxParallel: 4 | ||
|
||
- job: 'Publish' | ||
dependsOn: 'Test' | ||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.x' | ||
architecture: 'x64' | ||
|
||
- script: python setup.py sdist | ||
displayName: 'Build sdist' |