forked from tsunday/mappers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
178 lines (178 loc) · 5.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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
---
trigger:
- master
jobs:
- job: "Test"
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
precommit:
python.version: "3.8"
tox.env: precommit
py27-django110:
python.version: "2.7"
tox.env: py27-django110
py35-django110:
python.version: "3.5"
tox.env: py35-django110
py27-django111:
python.version: "2.7"
tox.env: py27-django111
py35-django111:
python.version: "3.5"
tox.env: py35-django111
py36-django111:
python.version: "3.6"
tox.env: py36-django111
py37-django111:
python.version: "3.7"
tox.env: py37-django111
py35-django20:
python.version: "3.5"
tox.env: py35-django20
py36-django20:
python.version: "3.6"
tox.env: py36-django20
py37-django20:
python.version: "3.7"
tox.env: py37-django20
py35-django21:
python.version: "3.5"
tox.env: py35-django21
py36-django21:
python.version: "3.6"
tox.env: py36-django21
py37-django21:
python.version: "3.7"
tox.env: py37-django21
py35-django22:
python.version: "3.5"
tox.env: py35-django22
py36-django22:
python.version: "3.6"
tox.env: py36-django22
py37-django22:
python.version: "3.7"
tox.env: py37-django22
py38-django22:
python.version: "3.8"
tox.env: py38-django22
py36-django30:
python.version: "3.6"
tox.env: py36-django30
py37-django30:
python.version: "3.7"
tox.env: py37-django30
py38-django30:
python.version: "3.8"
tox.env: py38-django30
flake8:
python.version: "3.8"
tox.env: flake8
bandit:
python.version: "3.8"
tox.env: bandit
xenon:
python.version: "3.8"
tox.env: xenon
mypy:
python.version: "3.8"
tox.env: mypy
importlint:
python.version: "3.8"
tox.env: importlint
mkdocs:
python.version: "3.8"
tox.env: mkdocs
vale:
python.version: "3.8"
tox.env: vale
doctest:
python.version: "3.8"
tox.env: doctest
remarklint:
python.version: "3.8"
tox.env: remarklint
yamllint:
python.version: "3.8"
tox.env: yamllint
jscpd:
python.version: "3.8"
tox.env: jscpd
commitlint:
python.version: "3.8"
tox.env: commitlint
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
displayName: Install Python.
- script: pip install --upgrade tox codecov
displayName: Install Tox.
- task: NodeTool@0
inputs:
versionSpec: "10.x"
condition: in(variables['tox.env'], 'remarklint', 'jscpd')
displayName: Install NodeJS.
- script: |
curl https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh
echo '##vso[task.prependpath]$(system.defaultWorkingDirectory)/bin'
condition: in(variables['tox.env'], 'vale')
displayName: Install Vale.
- script: |
git remote set-branches origin master
git fetch --quiet
git checkout master --quiet
git checkout - --quiet
condition: in(variables['tox.env'], 'commitlint')
displayName: Unshallow commit log.
- script: tox -e $(tox.env)
displayName: Run Tox.
- script: |
if [ -f .coverage ]
then
codecov
fi
env:
CODECOV_TOKEN: 52a8cc92-d147-4a70-ac68-0b4e85b56b21
displayName: Report Coverage.
- job: "Deploy"
dependsOn:
- "Test"
condition: |
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: Install Python.
- script: pip install --upgrade tox
displayName: Install Tox.
- script: |
curl -sSL "https://raw.githubusercontent.com\
/python-poetry/poetry/master/get-poetry.py" | python
echo '##vso[task.prependpath]$(HOME)/.poetry/bin'
displayName: Install Poetry.
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: Install NodeJS.
- script: |
npm install
displayName: Install JS dependencies.
- script: |
git remote set-branches origin master
git fetch --quiet
git checkout master --quiet
displayName: Unshallow commit log.
- script: |
npx semantic-release
env:
GIT_AUTHOR_NAME: $(GIT_AUTHOR_NAME)
GIT_AUTHOR_EMAIL: $(GIT_AUTHOR_EMAIL)
GIT_COMMITTER_NAME: $(GIT_COMMITTER_NAME)
GIT_COMMITTER_EMAIL: $(GIT_COMMITTER_EMAIL)
POETRY_PYPI_TOKEN_PYPI: $(POETRY_PYPI_TOKEN_PYPI)
GITHUB_TOKEN: $(GITHUB_TOKEN)
displayName: Release package.