-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
73 lines (63 loc) · 1.49 KB
/
.gitlab-ci.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
image: themattrix/tox
before_script:
- apt-get update -qy
- apt-get install -y --force-yes lsb-release fakeroot
- pip3 install -r requirements.txt
- pip3 install -e .
- echo "export PATCH=$CI_BUILD_ID" > PATCH_VERSION
stages:
- test
- package
- upload
# .prep_test: &prep_test |
# - apt-get update
# - apt-get install -y --force-yes lsb-release fakeroot python-dev python-pip
# - pip install -r requirements.txt
# - echo "export PATCH=$CI_BUILD_ID" > PATCH_VERSION
pages:
stage: test
allow_failure: true
script:
- cd docs
- make html
- mv _build/html/ ../public/
# - time make cover && mv htmlcov public/
# - mv docs public/
# - echo '<html><body><a href="htmlcov/index.html">Test Coverage</a><br/><a href="docs/index.html">Developer Documentation</a></body></html>' > public/index.html
coverage: '/TOTAL.*?\s+(\d+%)/'
artifacts:
paths:
- public
only:
- dev
test:
stage: test
script:
- make test
variables:
PATCH: $CI_BUILD_ID
only:
- dev
- master
package:
stage: package
script:
- make package PY_VERSION=3
- pip3 install dist/*.whl
artifacts:
paths:
- dist
variables:
PATCH: $CI_BUILD_ID
only:
- master
- /^v\d+\.\d+(?:.\d+)?(?:-\d+)?$/ # use regexp
upload:
stage: upload
script:
- pip3 install twine
- twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
# variables:
# PYPI_USERNAME: $CI_BUILD_ID
only:
- /^v\d+\.\d+(?:.\d+)?(?:-\d+)?$/ # use regexp