-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
82 lines (70 loc) · 1.67 KB
/
.gitlab-ci.yml
File metadata and controls
82 lines (70 loc) · 1.67 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
image: python:3.10
stages:
- license-check
- analysis
- test
- post-merge
variables:
UV_VERSION: "0.9.9"
PYTHON_VERSION: "3.10"
BASE_LAYER: bookworm-slim
# 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: &uv
variables:
UV_CACHE_DIR: .uv-cache
cache:
- key:
files:
- uv.lock
paths:
- $UV_CACHE_DIR
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
script:
- uv sync --frozen
- uv cache prune --ci
license-check:
<<: *uv
stage: license-check
script:
- uv run python scripts/check_license_header.py
ruff:
<<: *uv
stage: analysis
script:
- uv run ruff check deepfellow/ tests/
ruff-format:
<<: *uv
stage: analysis
script:
- uv run ruff format --check deepfellow/ tests/
mypy:
<<: *uv
stage: analysis
script:
- uv run mypy deepfellow/ tests/
pyright:
<<: *uv
stage: analysis
script:
- PYRIGHT_PYTHON_NODE_VERSION=24.10.0 uv run pyright
pytest:
<<: *uv
stage: test
script:
- uv run pytest --showlocals --tb=auto -ra --cov deepfellow --cov-branch --cov-report=term-missing --cov-report xml:coverage_cli.xml --no-cov-on-fail tests/
coverage: '/(?i)total.*? (100(?:\.0)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
expire_in: 1 week
reports:
coverage_report:
coverage_format: cobertura
path: coverage_cli.xml
create_issue_on_merge:
image: hub.simplito.com/deepfellow/automatic-issue-creator:0.7.0
stage: post-merge
only:
- main # change to 'master' if that's your default branch
script:
- /work/script.sh