-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
82 lines (68 loc) · 1.52 KB
/
.gitlab-ci.yml
File metadata and controls
82 lines (68 loc) · 1.52 KB
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
# Global --------------------------
variables:
# GitLab CI creates a separate mountpoint for the build directory,
# so we need to copy instead of using hard links.
UV_LINK_MODE: copy
UV_CACHE_DIR: .uv-cache
cache:
- key:
files:
- uv.lock
paths:
- $UV_CACHE_DIR
stages:
- quality
- tests
# Jobs templates ------------------
.install-deps-template: &install-deps
image: python:{{ cookiecutter.python_version }}
before_script:
- pip install uv==0.8.14
- uv --version
- uv sync --dev
after_script:
- uv cache prune --ci
.quality-template: &quality
<<: *install-deps
stage: quality
# Quality jobs ----------------------
check-dependencies:
<<: *quality
script: make check-dependencies
check-codestyle:
<<: *quality
script: make check-codestyle
check-ruff:
<<: *quality
script: make check-ruff-gitlab
artifacts:
reports:
codequality: ruff-report.json
when: always
expire_in: 1 week
check-mypy:
<<: *quality
script: make check-mypy-gitlab
artifacts:
reports:
codequality: mypy-report.json
when: always
expire_in: 1 week
check-safety:
<<: *quality
script: make check-safety
allow_failure: true
# Tests jobs ------------------------
test:
<<: *install-deps
stage: tests
coverage: '/TOTAL.*\s(\d+\.\d+\%)/'
script: make test
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: reports/coverage.xml
junit: reports/junit.xml
when: always
expire_in: 1 week