-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
79 lines (71 loc) · 1.95 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
---
stages:
- test
- build
- release
variables:
UV_VERSION: 0.4
UV_CACHE_DIR: .uv-cache
BASE_LAYER: bookworm-slim
cache:
- key:
files:
- uv.lock
paths:
- $UV_CACHE_DIR
before_script:
- apt update
- env DEBIAN_FRONTEND=noninteractive apt install --yes --quiet gcc python3-dev libldap2-dev libsasl2-dev libssl-dev slapd ldap-utils git curl
# Rust is needed to install the zxcvbn dependency
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- export PATH="$HOME/.cargo/bin:$PATH"
style:
variables:
PYTHON_VERSION: "3.13"
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
stage: test
script:
- uv sync --all-extras
- uv run pre-commit run --all-files --show-diff-on-failure
- uv cache prune --ci
coverage:
variables:
PYTHON_VERSION: "3.12"
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
stage: test
script:
- uv sync --all-extras
- uv pip install coveralls pyyaml tomli
- uv run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered -n auto
- uv run coveralls
- uv cache prune --ci
tests:
needs: ["coverage", "style"]
parallel:
matrix:
- PYTHON_VERSION: ['3.10', '3.11', '3.12']
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
stage: test
script:
- uv sync --all-extras
- uv run pytest
- uv cache prune --ci
minversions:
needs: ["tests"]
variables:
PYTHON_VERSION: "3.10"
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
stage: test
script:
- uv sync --all-extras --resolution=lowest-direct
- uv run pytest
- uv cache prune --ci
doc:
variables:
PYTHON_VERSION: "3.13"
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
stage: test
script:
- uv sync --group doc
- uv run sphinx-build doc build/sphinx/html --fail-on-warning
- uv cache prune --ci