Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #27 from tubone24/azure-pipelines
Browse files Browse the repository at this point in the history
Set up CI with Azure Pipelines
  • Loading branch information
tubone24 committed Feb 7, 2019
2 parents e3a3dbe + a4b0d44 commit d213c4a
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions azure-pipelines.yml
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'

0 comments on commit d213c4a

Please sign in to comment.