-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
94 lines (84 loc) · 2.13 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
stages:
- "lint"
- "UnitTests"
- "docs"
- "quality"
- "deploys"
Linter:
stage: lint
image: "python:3"
only:
- branches
- tags
- merge_requests
script:
- pip install -q --no-cache-dir pylint black isort autoflake
- make lint
.UnitTests:
artifacts:
paths:
- htmlcov_${CI_PROJECT_NAME}_$PYVERSION.tar.bz2
- coverage_${CI_PROJECT_NAME}_$PYVERSION.xml
expire_in: 1 day
before_script:
- pip install -q --no-cache-dir --upgrade -r requirements.txt
after_script:
- coverage html
- mv htmlcov htmlcov_${CI_PROJECT_NAME}_$PYVERSION
- tar cjf htmlcov_${CI_PROJECT_NAME}_$PYVERSION.tar.bz2 htmlcov_${CI_PROJECT_NAME}_$PYVERSION
- coverage xml
- mv coverage.xml coverage_${CI_PROJECT_NAME}_$PYVERSION.xml
UnitTests-3:
extends: ".UnitTests"
stage: "UnitTests"
variables:
PYVERSION: "3"
image: "python:3.8"
only:
- branches
- tags
- merge_requests
script:
- pip install -q --no-cache-dir --upgrade -r requirements.py3.txt
- make test
UnitTests-2:
extends: ".UnitTests"
stage: "UnitTests"
variables:
PYVERSION: "2"
image: "python:2"
only:
- branches
- tags
- merge_requests
script:
- make test APIV2=no
Docs:
image: "python:3"
only:
- branches
- tags
- merge_requests
stage: docs
before_script:
- pip install -q --no-cache-dir --upgrade -r requirements.txt
- pip install -q --no-cache-dir -r requirements.doc.txt
script:
- cd docs && make html && make html && cd ..
- mv docs/build/html ./mambupy_docs
- tar czf ./mambupy_docs.tar.gz ./mambupy_docs
artifacts:
paths:
- ./mambupy_docs
- ./mambupy_docs.tar.gz
expire_in: 1 day
# gitlab users forking this project: you should create a group named
# mambupy with a project named mambupy-deploy, with a file named
# .gitlab-ci_deploy.yml
# without this, your pipelines will fail
# there you can put your own deploy rules, or if you don't have any,
# you can add a job for some of the "quality" or "deploys" stages
# doing an echo to console
include:
- project: 'mambupy/mambupy-deploy'
file: '.gitlab-ci_deploy.yml'