-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
84 lines (72 loc) · 1.4 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
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
GIT_STRATEGY: clone
cache:
paths:
- .cache/pip
stages:
- lint
- test
- doc
- build
.except-default: &except-default
except:
- tags
.python_version:
<<: *except-default
image: python:3.7
before_script:
- python -m pip install --upgrade pip
- python -m pip install --upgrade -r requirements-dev.txt
- python -m pip install -e .
lint:
stage: lint
extends: .python_version
script:
- ./tools/pyflakes.sh
lint strict:
stage: lint
extends: .python_version
script:
- ./tools/pyflakes-strict.sh
bandit:
extends: .python_version
stage: lint
script:
- pip install bandit
- bandit -r woob
- bandit -r modules
- bandit -r contrib
check modules:
stage: test
extends: .python_version
script:
- .ci/check_modules.sh
test:
stage: test
extends: .python_version
script:
- ./tools/run_tests.sh --no-modules
- coverage xml -o coverage.xml -i
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
doc:
stage: doc
extends: .python_version
script:
- make docs
build:
stage: build
extends: .python_version
script:
- pip install build twine
- python -m build
- twine check dist/*.whl
local install:
stage: build
extends: .python_version
script:
- ./tools/local_install.sh --local-modules ~/bin