-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathazure-pipelines.yml
91 lines (86 loc) · 2.02 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
trigger:
batch: true
branches:
include:
- '*'
paths:
exclude:
- 'docs/*'
- '*.md'
tags:
include:
- v*
pr:
paths:
exclude:
- 'docs/*'
- '*.md'
stages:
- stage: test_and_validate
displayName: 'Validate and Test'
pool:
vmImage: 'ubuntu-16.04'
jobs:
- job: 'Validate'
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
pip install flake8
python -m flake8 spacy_ann --count --select=E901,E999,F821,F822,F823 --show-source --statistics
displayName: 'flake8'
- job: 'Test'
dependsOn: 'Validate'
strategy:
matrix:
Python36Linux:
imageName: 'ubuntu-16.04'
python.version: '3.6'
Python37Linux:
imageName: 'ubuntu-16.04'
python.version: '3.7'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: |
pip install flit
flit install --deps=all --symlink
spacy download en_core_web_md
displayName: 'Install dependencies'
- script: |
bash scripts/test.sh
displayName: Test
- script: |
bash <(curl -s https://codecov.io/bash)
displayName: codecov.io
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
- stage: Publish
displayName: 'Publish to PyPI'
dependsOn: test_and_validate
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags'))
pool:
vmImage: 'ubuntu-16.04'
jobs:
- job: 'Publish'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'
- script: |
pip install flit
flit install --deps=develop --symlink
displayName: 'Install dependencies'
- script: |
bash scripts/deploy.sh
displayName: Deploy
env:
FLIT_USERNAME: $(FLIT_USERNAME)
FLIT_PASSWORD: $(FLIT_PASSWORD)