File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
{{ cookiecutter.project_name.lower().replace(' ', '-') }} Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 11# Global --------------------------
22
33variables :
4- UV_VERSION : " 0.8.14"
5- PYTHON_VERSION : " {{ cookiecutter.python_version }}"
6- BASE_LAYER : bookworm-slim
74 # GitLab CI creates a separate mountpoint for the build directory,
85 # so we need to copy instead of using hard links.
96 UV_LINK_MODE : copy
@@ -23,8 +20,9 @@ stages:
2320# Jobs templates ------------------
2421
2522.install-deps-template : &install-deps
26- image : ghcr.io/astral-sh/uv:$UV_VERSION- python$PYTHON_VERSION-$BASE_LAYER
23+ image : python:{{ cookiecutter.python_version }}
2724 before_script :
25+ - pip install uv==0.8.14
2826 - uv --version
2927 - uv sync --dev
3028 after_script :
Original file line number Diff line number Diff line change @@ -56,17 +56,26 @@ check-ruff:
5656.PHONY : check-codestyle
5757check-codestyle :
5858 uv run ruff format $(CODE ) --check
59-
60-
59+ {% if cookiecutter.git_platform == 'gitlab' %}
60+ .PHONY : check-ruff-gitlab
61+ check-ruff-gitlab :
62+ uv run ruff check $(CODE ) --output-format=gitlab > ruff-report.json
63+ {% endif %}
64+ {% if cookiecutter.git_platform == 'github' %}
6165.PHONY : check-ruff-github
6266check-ruff-github :
6367 uv run ruff check $(CODE ) --no-fix --output-format=github
64-
68+ {% endif %}
6569
6670.PHONY : check-mypy
6771check-mypy :
6872 uv run mypy --install-types --non-interactive --config-file pyproject.toml $(CODE )
69-
73+ {% if cookiecutter.git_platform == 'gitlab' %}
74+ .PHONY : check-mypy-gitlab
75+ check-mypy-gitlab :
76+ uv run mypy --install-types --non-interactive --no-error-summary --no-pretty --config-file pyproject.toml $(CODE ) \
77+ 2>&1 | uv run mypy-gitlab-code-quality > mypy-report.json
78+ {% endif %}
7079.PHONY : static-lint
7180static-lint : check-ruff check-mypy
7281
You can’t perform that action at this time.
0 commit comments