-
-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
56 lines (51 loc) · 1.19 KB
/
.gitlab-ci.yml
File metadata and controls
56 lines (51 loc) · 1.19 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
stages:
- "test"
variables:
UV_VERSION: "0.9.17"
PYTHON_VERSION: "3.13"
BASE_LAYER: bookworm-slim
UV_LINK_MODE: copy
.test-template:
stage: test
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
tags:
- kubernetes-runner
- docker-runner
except:
- tags
variables:
UV_CACHE_DIR: .uv-cache
cache:
- key:
files:
- uv.lock
paths:
- $UV_CACHE_DIR
before_script:
- cd $CI_PROJECT_DIR
- uv sync --locked --all-extras --dev
after_script:
- uv cache prune --ci
formatter:
extends:
- .test-template
script:
- uv run ruff format --diff
ruff:
extends:
- .test-template
script:
- uv run ruff check {{cookiecutter.project_name}} tests --output-format=gitlab --output-file=code-quality-report.json
artifacts:
reports:
codequality: $CI_PROJECT_DIR/code-quality-report.json
mypy:
extends:
- .test-template
script:
- uv run mypy {{cookiecutter.project_name}} tests --output=json > mypy-out.json || true
- uv run mypy-gitlab-code-quality < mypy-out.json > codequality.json
artifacts:
when: always
reports:
codequality: $CI_PROJECT_DIR/codequality.json