2020-08-18 15:39:34 +00:00
|
|
|
---
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- build
|
|
|
|
- release
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
variables:
|
|
|
|
UV_VERSION: 0.4
|
|
|
|
UV_CACHE_DIR: .uv-cache
|
|
|
|
BASE_LAYER: bookworm-slim
|
2023-08-13 11:16:42 +00:00
|
|
|
|
|
|
|
cache:
|
2024-10-28 08:01:52 +00:00
|
|
|
- key:
|
|
|
|
files:
|
|
|
|
- uv.lock
|
|
|
|
paths:
|
|
|
|
- $UV_CACHE_DIR
|
2020-08-18 15:39:34 +00:00
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
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"
|
2021-11-17 10:11:20 +00:00
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
style:
|
|
|
|
variables:
|
2024-10-31 19:08:35 +00:00
|
|
|
PYTHON_VERSION: "3.13"
|
2024-10-28 08:01:52 +00:00
|
|
|
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
|
2022-11-01 10:49:26 +00:00
|
|
|
stage: test
|
2023-08-13 11:16:42 +00:00
|
|
|
script:
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv sync --all-extras
|
|
|
|
- uv run pre-commit run --all-files --show-diff-on-failure
|
|
|
|
- uv cache prune --ci
|
2022-11-01 10:49:26 +00:00
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
coverage:
|
|
|
|
variables:
|
2024-11-06 19:14:52 +00:00
|
|
|
PYTHON_VERSION: "3.12"
|
2024-10-28 08:01:52 +00:00
|
|
|
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
|
2023-11-01 19:22:26 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv sync --all-extras
|
|
|
|
- uv pip install coveralls pyyaml tomli
|
2025-01-02 22:54:10 +00:00
|
|
|
- uv run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered --numprocesses auto
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv run coveralls
|
|
|
|
- uv cache prune --ci
|
2023-11-01 19:22:26 +00:00
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
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
|
2024-10-27 10:21:42 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv sync --all-extras
|
2025-01-02 22:54:10 +00:00
|
|
|
- uv run pytest --numprocesses auto
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv cache prune --ci
|
2024-10-27 10:21:42 +00:00
|
|
|
|
2023-08-13 11:49:26 +00:00
|
|
|
minversions:
|
2024-10-28 08:01:52 +00:00
|
|
|
needs: ["tests"]
|
|
|
|
variables:
|
2024-10-31 19:08:35 +00:00
|
|
|
PYTHON_VERSION: "3.10"
|
2024-10-28 08:01:52 +00:00
|
|
|
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
|
2023-08-13 11:49:26 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv sync --all-extras --resolution=lowest-direct
|
2025-01-02 22:54:10 +00:00
|
|
|
- uv run pytest --numprocesses auto
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv cache prune --ci
|
2023-08-13 11:49:26 +00:00
|
|
|
|
2020-11-06 10:44:25 +00:00
|
|
|
doc:
|
2024-10-28 08:01:52 +00:00
|
|
|
variables:
|
2024-10-31 19:08:35 +00:00
|
|
|
PYTHON_VERSION: "3.13"
|
2024-10-28 08:01:52 +00:00
|
|
|
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
|
2020-08-19 07:18:38 +00:00
|
|
|
stage: test
|
2020-08-19 07:24:07 +00:00
|
|
|
script:
|
2024-12-19 09:40:06 +00:00
|
|
|
- uv sync --group doc --all-extras
|
2024-12-05 10:03:26 +00:00
|
|
|
- uv run sphinx-build doc build/sphinx/html --fail-on-warning
|
2024-10-28 08:01:52 +00:00
|
|
|
- uv cache prune --ci
|