Skip to content

Commit

Permalink
Merge pull request #42 from danielthepope/azure-pipelines
Browse files Browse the repository at this point in the history
Add Azure Pipelines config, adding pycodestyle
  • Loading branch information
MikeSmithEU authored Mar 20, 2019
2 parents fbefd86 + 4a547ec commit 042c36e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
67 changes: 67 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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'
strategy:
matrix:
Ubuntu-Python35:
imageName: 'Ubuntu-16.04'
python.version: '3.5'
Ubuntu-Python36:
imageName: 'Ubuntu-16.04'
python.version: '3.6'
Ubuntu-Python37:
imageName: 'Ubuntu-16.04'
python.version: '3.7'
Windows-Python37:
imageName: 'vs2017-win2016'
python.version: '3.7'
Mac-Python37:
imageName: 'macos-10.13'
python.version: '3.7'

pool:
vmImage: $(imageName)

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python -m pip install --upgrade pip && pip install ".[api,test]"
displayName: 'Install dependencies'

- script: |
pip install pytest
pytest tests --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()

- job: 'Lint'
pool:
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: python -m pip install --upgrade pip && pip install pycodestyle
displayName: 'Install pycodestyle'

- script: pycodestyle
displayName: 'pycodestyle'
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"sphinx-argparse==0.2.5",
],
'test': [
"pytest>=4.2.0"
"pytest>=4.2.0",
"pycodestyle==2.5.0"
]
},
platforms='any',
Expand Down
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ envlist = py35,py36,py37
[testenv]
commands = pytest {posargs}
deps = .[test,api]

[pycodestyle]
count = False
max-line-length = 120

0 comments on commit 042c36e

Please sign in to comment.