This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
forked from orbingol/NURBS-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
148 lines (131 loc) · 2.9 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
---
kind: pipeline
type: docker
name: default
steps:
- name: merge master on dev
image: alpine/git
when:
event: push
branch: master
commands:
- cd /tmp
- git clone $DRONE_GIT_HTTP_URL
- cd nurbs
- git checkout master
- git fetch origin dev
- git checkout dev
- git merge master
- git push
- name: notify by email
when:
event: push
branch:
- master
- dev
status:
- failure
image: drillster/drone-email
settings:
host: mail.dessia.tech
username: technical@dessia.tech
password:
from_secret: email_password
from: technical@dessia.tech
- name: check code complexity
image: dessia/python-ci:3.9
when:
event:
exclude:
- tag
commands:
- git fetch --tags
- pip install Cython
- python setup.py build_ext --inplace
- python setup.py install
- pip install pylint==2.17.3 pydocstyle==6.3.0 pre-commit shellcheck-py cython-lint pyenchant==3.2.2
- python code_pylint.py
- python code_pydocstyle.py
- pre-commit run -a
volumes:
# Mount pip cache from host
- name: cache
path: /root/.cache
- name: check changelog update
image: python:3.9
when:
event: pull_request
commands:
- bash code_changelog.sh
- name: install, build doc run scripts and tutorials
image: python:3.9
commands:
- git fetch --tags
- pip install Cython pytest sphinx sphinx-rtd-theme matplotlib coverage
- python setup.py build_ext --inplace
- python setup.py install
- cd docs
- make html
- cd ../tests
- coverage run --rcfile=../.coveragerc --data-file=../.coverage --source nurbs -m pytest
- cd ..
- coverage json
- coverage report
- coverage html
- python coverage.py
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
- name: generate sdist
image: python:3.9
commands:
- git fetch --tags
- pip install Cython
- 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:
branch: master
event: push
settings:
host: austerlitz.dessia.tech
target: /var/www/documentation/nurbs/
source: docs/_build/html/*
strip_components: 3
username: drone
password:
from_secret: ssh_drone_password
- name: upload coverage
image: appleboy/drone-scp
when:
event: push
failure: ignore
settings:
host: magenta.dessia.tech
target: /var/www/cdn/nurbs/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
- name: cache
host:
path: /tmp/cache/drone