-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
63 lines (52 loc) · 1.71 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
trigger:
branches:
include:
- '*'
tags:
include:
- releases/*
jobs:
- job: Build
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
displayName: Setup Python
inputs:
versionSpec: '3.7'
- bash: 'make install'
displayName: Install Dependencies
workingDirectory: '$(System.DefaultWorkingDirectory)'
- bash: 'export PYTHONPATH=$(pwd) && python -m pipenv run make per-commit'
displayName: Build
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: 'test_results/test_results.xml'
condition: succeededOrFailed()
- bash: 'python -m pipenv run make publish-coverage'
displayName: Publish Coverage Report to Coveralls
workingDirectory: '$(System.DefaultWorkingDirectory)'
env:
COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN)
- job: Publish
dependsOn:
- Build
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/releases/'))
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
displayName: Setup Python
inputs:
versionSpec: '3.7'
- bash: 'make install'
displayName: Install Dependencies
workingDirectory: '$(System.DefaultWorkingDirectory)'
- bash: 'python -m pipenv run make publish-pypi'
displayName: Publish Package to PyPi
workingDirectory: '$(System.DefaultWorkingDirectory)'
env:
PYPI_USERNAME: $(PYPI_USERNAME)
PYPI_PASSWORD: $(PYPI_PASSWORD)