-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
92 lines (75 loc) · 1.38 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
variables:
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
POETRY_VIRTUALENVS_IN_PROJECT: "true"
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache/pip
- .venv
stages:
- quality
- tests
- deploy
.install-deps-template: &install-deps
before_script:
- pip install poetry
- poetry --version
- poetry install -vv
# Quality jobs
.quality-template: &quality
<<: *install-deps
image: python:3.10
stage: quality
check-docs:
<<: *quality
script:
- mkdir -p build/coverage
- touch build/coverage/index.html
- poetry run duty check-docs
#check-code-quality:
# <<: *quality
# script: poetry run duty check-code-quality
check-types:
<<: *quality
script: poetry run duty check-types
check-dependencies:
<<: *quality
script: poetry run duty check-dependencies
# Tests jobs
.test-template: &test
<<: *install-deps
stage: tests
script: poetry run duty test
artifacts:
paths:
- .coverage-*
python3.6:
<<: *test
image: python:3.10
python3.7:
<<: *test
image: python:3.10
python3.8:
<<: *test
image: python:3.10
python3.9:
<<: *test
image: python:3.10
pages:
stage: deploy
<<: *install-deps
image: python:3.10
dependencies:
- python3.6
- python3.7
- python3.8
- python3.9
script:
- poetry run duty coverage
- poetry run duty docs
coverage: '/^TOTAL.+?(\d+\.\d+\%)$/'
artifacts:
paths:
- public
only:
- master