Skip to content

Commit 43440cd

Browse files
committed
feat: adjust cicd in gitlab and bitbucket pipelines to ensure parity between platform providers in cicd
1 parent 3abe193 commit 43440cd

File tree

2 files changed

+76
-2
lines changed

2 files changed

+76
-2
lines changed

{{cookiecutter.project_name}}/{% if cookiecutter.repository_provider == 'bitbucket' %}bitbucket-pipelines.yml{% endif %}

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,69 @@ pipelines:
5959
after-script:
6060
- echo "Security checks completed"
6161

62+
# Parallel typecheck execution across Python versions
63+
- parallel:
64+
steps:
65+
- step:
66+
name: Typecheck Python 3.9
67+
image: ghcr.io/astral-sh/uv:latest-python3.9-bookworm-slim
68+
caches:
69+
- uv
70+
- pip
71+
script:
72+
- export UV_CACHE_DIR=.uv-cache
73+
- export UV_LINK_MODE=copy
74+
- uvx nox -s typecheck-3.9
75+
- uv cache prune --ci
76+
77+
- step:
78+
name: Typecheck Python 3.10
79+
image: ghcr.io/astral-sh/uv:latest-python3.10-bookworm-slim
80+
caches:
81+
- uv
82+
- pip
83+
script:
84+
- export UV_CACHE_DIR=.uv-cache
85+
- export UV_LINK_MODE=copy
86+
- uvx nox -s typecheck-3.10
87+
- uv cache prune --ci
88+
89+
- step:
90+
name: Typecheck Python 3.11
91+
image: ghcr.io/astral-sh/uv:latest-python3.11-bookworm-slim
92+
caches:
93+
- uv
94+
- pip
95+
script:
96+
- export UV_CACHE_DIR=.uv-cache
97+
- export UV_LINK_MODE=copy
98+
- uvx nox -s typecheck-3.11
99+
- uv cache prune --ci
100+
101+
- step:
102+
name: Typecheck Python 3.12
103+
image: ghcr.io/astral-sh/uv:latest-python3.12-bookworm-slim
104+
caches:
105+
- uv
106+
- pip
107+
script:
108+
- export UV_CACHE_DIR=.uv-cache
109+
- export UV_LINK_MODE=copy
110+
- uvx nox -s typecheck-3.12
111+
- uv cache prune --ci
112+
113+
- step:
114+
name: Typecheck Python 3.13
115+
image: ghcr.io/astral-sh/uv:latest-python3.13-bookworm-slim
116+
caches:
117+
- uv
118+
- pip
119+
script:
120+
- export UV_CACHE_DIR=.uv-cache
121+
- export UV_LINK_MODE=copy
122+
- uvx nox -s typecheck-3.13
123+
- uv cache prune --ci
124+
62125
# Parallel test execution across Python versions
63126
- parallel:
64127
steps:

{{cookiecutter.project_name}}/{% if cookiecutter.repository_provider == 'gitlab' %}.gitlab-ci.yml{% endif %}

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ variables:
1212
# Define stages
1313
stages:
1414
- quality
15+
- typecheck
1516
- test
1617
- security
1718
- build
@@ -61,9 +62,19 @@ quality-python:
6162
- ".gitlab-ci.yml"
6263

6364
typecheck-python:
64-
<<: *quality-job
65+
stage: typecheck
66+
<<: *uv-cache
67+
<<: *on-merge-requests-and-main
68+
parallel:
69+
matrix:
70+
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13"]
71+
image: ghcr.io/astral-sh/uv:latest-python$PYTHON_VERSION-bookworm-slim
72+
before_script:
73+
- uv --version
6574
script:
66-
- uvx nox -s typecheck
75+
- uvx nox -s typecheck-$PYTHON_VERSION
76+
after_script:
77+
- uv cache prune --ci
6778
changes:
6879
- "src/**/*.py"
6980
- "tests/**/*.py"

0 commit comments

Comments
 (0)