-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazure-pipelines.yml
47 lines (42 loc) · 1.21 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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
## The release build overwrites these trigger in Azure
trigger:
branches:
include:
- master
- 'refs/tags/*'
exclude:
- next_*
pr:
- master
jobs:
- job: 'Package'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'
- script: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
displayName: 'Install dependencies'
- script: |
python setup.py sdist
displayName: 'Make sdist'
- script: |
python setup.py bdist_wheel
displayName: 'Make wheel'
- script: |
pip install pytest pytest-azurepipelines
pip install .
python -m pytest --pyargs prince_cr --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'artifact'
targetPath: 'dist'