-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
171 lines (149 loc) · 3.39 KB
/
.drone.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
---
kind: pipeline
type: docker
name: default
steps:
- name: merge master on testing
image: alpine/git
when:
event: push
branch: master
commands:
- git fetch origin testing
- git checkout testing
- git merge master
- git push
#- name: merge testing on dev
# image: alpine/git
# when:
# event: push
# branch: testing
# commands:
# - git fetch origin dev
# - git checkout dev
# - git merge testing
# - git push
- name: notify
when:
status:
- failure
image: drillster/drone-email
settings:
host: mail.dessia.tech
username: [email protected]
password:
from_secret: email_password
from: [email protected]
- name: check code complexity, docs & code quality
image: dessia/python-ci:3.9
commands:
- pip install pydocstyle==6.3.0 pylint==2.16.1 pyenchant==3.2.2
- python code_pylint.py
- python code_pydocstyle.py
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: check pep8 formatting
image: python:3.9
commands:
- git fetch --tags
- pip3 install -U pip autopep8
- bash code_pep8.sh
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: check changelog update
image: python:3.9
when:
event: pull_request
branch:
- master
- dev
commands:
- bash code_changelog.sh
- name: install, run scripts and build doc
image: python:3.9
commands:
- git fetch --tags
- pip install .
- pip install sphinx sphinx-rtd-theme coverage volmdlr==0.12.0 nbformat nbconvert
- pip install plot_data --no-cache-dir
- pip show coverage
- pip show plot_data
- cd doc
- make html
- cd ../scripts
- coverage run --source dessia_common ci_scripts.py
- cd ../tests
- coverage run --source dessia_common -m unittest discover -v
- cd ../tutorials
- coverage run --source dessia_common ci_tutorials.py
- cd ..
- coverage combine scripts/.coverage tests/.coverage tutorials/.coverage
- coverage json
- coverage report
- coverage html
- python coverage.py
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: develop
image: python:3.9
commands:
- python setup.py develop
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: generate sdist
image: python:3.9
when:
branch: master
commands:
- git fetch --tags
- python setup.py sdist
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: upload to pypi
image: plugins/pypi
when:
event: tag
settings:
skip_build: True
username: dessia_tech
password:
from_secret: pypi_password
- name: upload_doc_master
image: appleboy/drone-scp
when:
event: push
branch: master
settings:
host: austerlitz.dessia.tech
target: /var/www/documentation/dessia_common/
source: doc/build/html/*
strip_components: 3
username: drone
password:
from_secret: ssh_drone_password
- name: upload coverage
image: appleboy/drone-scp
when:
event: push
settings:
host: magenta.dessia.tech
target: /var/www/cdn/dessia_common/coverage/${DRONE_BRANCH}
source: htmlcov/*
strip_components: 1
username: drone
password:
from_secret: ssh_drone_password
volumes:
- name: pip_cache
host:
path: /tmp/cache/drone/pip