Skip to content

Commit e9e7dd1

Browse files
Set up CI with Azure Pipelines
1 parent d1f16af commit e9e7dd1

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

azure-pipelines.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/vsts/pipelines/languages/python
5+
6+
jobs:
7+
8+
- job: 'Test'
9+
pool:
10+
vmImage: 'Ubuntu 16.04'
11+
strategy:
12+
matrix:
13+
Python34:
14+
python.version: '3.4'
15+
Python35:
16+
python.version: '3.5'
17+
Python36:
18+
python.version: '3.6'
19+
Python37:
20+
python.version: '3.7'
21+
maxParallel: 4
22+
23+
steps:
24+
- task: UsePythonVersion@0
25+
inputs:
26+
versionSpec: '$(python.version)'
27+
architecture: 'x64'
28+
29+
- script: python -m pip install --upgrade pip && pip install tox
30+
displayName: 'Install dependencies'
31+
32+
- script: |
33+
tox
34+
displayName: 'pytest'
35+
36+
- task: PublishTestResults@2
37+
inputs:
38+
testResultsFiles: '**/test-results.xml'
39+
testRunTitle: 'Python $(python.version)'
40+
condition: succeededOrFailed()
41+
42+
- job: 'Publish'
43+
dependsOn: 'Test'
44+
pool:
45+
vmImage: 'Ubuntu 16.04'
46+
47+
steps:
48+
- task: UsePythonVersion@0
49+
inputs:
50+
versionSpec: '3.x'
51+
architecture: 'x64'
52+
53+
- script: python setup.py sdist
54+
displayName: 'Build sdist'

0 commit comments

Comments
 (0)