Skip to content

Commit e7be631

Browse files
committed
ci(bitbucket): add missing windows and macos tests along with uploading to testpypi
1 parent 00a7002 commit e7be631

File tree

1 file changed

+134
-29
lines changed

1 file changed

+134
-29
lines changed

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

Lines changed: 134 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -134,79 +134,108 @@ pipelines:
134134
- uvx nox -s typecheck-3.13
135135
- uv cache prune --ci
136136

137-
# Parallel test execution across Python versions
137+
# Parallel test execution across Python versions and platforms
138138
- parallel:
139139
steps:
140+
# Linux testing across all Python versions
140141
- step:
141-
name: Test Python 3.9
142+
name: Test Python 3.9 (Linux)
142143
image: ghcr.io/astral-sh/uv:latest-python3.9-bookworm-slim
143144
caches:
144145
- uv
145146
- pip
146147
script:
147148
- export UV_CACHE_DIR=.uv-cache
148149
- export UV_LINK_MODE=copy
149-
- uvx nox -s tests-python-39
150+
- uvx nox -s tests-python-3.9
150151
- uv cache prune --ci
151152
artifacts:
152153
- tests/results/*.xml
153154
- coverage.xml
154155

155156
- step:
156-
name: Test Python 3.10
157+
name: Test Python 3.10 (Linux)
157158
image: ghcr.io/astral-sh/uv:latest-python3.10-bookworm-slim
158159
caches:
159160
- uv
160161
- pip
161162
script:
162163
- export UV_CACHE_DIR=.uv-cache
163164
- export UV_LINK_MODE=copy
164-
- uvx nox -s tests-python-310
165+
- uvx nox -s tests-python-3.10
165166
- uv cache prune --ci
166167
artifacts:
167168
- tests/results/*.xml
168169
- coverage.xml
169170

170171
- step:
171-
name: Test Python 3.11
172+
name: Test Python 3.11 (Linux)
172173
image: ghcr.io/astral-sh/uv:latest-python3.11-bookworm-slim
173174
caches:
174175
- uv
175176
- pip
176177
script:
177178
- export UV_CACHE_DIR=.uv-cache
178179
- export UV_LINK_MODE=copy
179-
- uvx nox -s tests-python-311
180+
- uvx nox -s tests-python-3.11
180181
- uv cache prune --ci
181182
artifacts:
182183
- tests/results/*.xml
183184
- coverage.xml
184185

185186
- step:
186-
name: Test Python 3.12
187+
name: Test Python 3.12 (Linux)
187188
image: ghcr.io/astral-sh/uv:latest-python3.12-bookworm-slim
188189
caches:
189190
- uv
190191
- pip
191192
script:
192193
- export UV_CACHE_DIR=.uv-cache
193194
- export UV_LINK_MODE=copy
194-
- uvx nox -s tests-python-312
195+
- uvx nox -s tests-python-3.12
195196
- uv cache prune --ci
196197
artifacts:
197198
- tests/results/*.xml
198199
- coverage.xml
199200

200201
- step:
201-
name: Test Python 3.13
202+
name: Test Python 3.13 (Linux)
202203
image: ghcr.io/astral-sh/uv:latest-python3.13-bookworm-slim
203204
caches:
204205
- uv
205206
- pip
206207
script:
207208
- export UV_CACHE_DIR=.uv-cache
208209
- export UV_LINK_MODE=copy
209-
- uvx nox -s tests-python-313
210+
- uvx nox -s tests-python-3.13
211+
- uv cache prune --ci
212+
artifacts:
213+
- tests/results/*.xml
214+
- coverage.xml
215+
216+
# Cross-platform testing with latest Python
217+
- step:
218+
name: Test Python 3.13 (macOS)
219+
runs-on: macos
220+
script:
221+
- export UV_CACHE_DIR=.uv-cache
222+
- export UV_LINK_MODE=copy
223+
- curl -LsSf https://astral.sh/uv/install.sh | sh
224+
- export PATH="$PATH:$HOME/.cargo/bin"
225+
- uvx nox -s tests-python-3.13
226+
- uv cache prune --ci
227+
artifacts:
228+
- tests/results/*.xml
229+
- coverage.xml
230+
231+
- step:
232+
name: Test Python 3.13 (Windows)
233+
runs-on: windows
234+
script:
235+
- set UV_CACHE_DIR=.uv-cache
236+
- set UV_LINK_MODE=copy
237+
- powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
238+
- uvx nox -s tests-python-3.13
210239
- uv cache prune --ci
211240
artifacts:
212241
- tests/results/*.xml
@@ -323,79 +352,108 @@ pipelines:
323352
- uvx nox -s typecheck-3.13
324353
- uv cache prune --ci
325354

326-
# Parallel test execution
355+
# Parallel test execution across Python versions and platforms
327356
- parallel:
328357
steps:
358+
# Linux testing across all Python versions
329359
- step:
330-
name: Test Python 3.9
360+
name: Test Python 3.9 (Linux)
331361
image: ghcr.io/astral-sh/uv:latest-python3.9-bookworm-slim
332362
caches:
333363
- uv-deps
334364
- pip-deps
335365
script:
336366
- export UV_CACHE_DIR=.uv-cache
337367
- export UV_LINK_MODE=copy
338-
- uvx nox -s tests-python-39
368+
- uvx nox -s tests-python-3.9
339369
- uv cache prune --ci
340370
artifacts:
341371
- tests/results/*.xml
342372
- coverage.xml
343373

344374
- step:
345-
name: Test Python 3.10
375+
name: Test Python 3.10 (Linux)
346376
image: ghcr.io/astral-sh/uv:latest-python3.10-bookworm-slim
347377
caches:
348378
- uv-deps
349379
- pip-deps
350380
script:
351381
- export UV_CACHE_DIR=.uv-cache
352382
- export UV_LINK_MODE=copy
353-
- uvx nox -s tests-python-310
383+
- uvx nox -s tests-python-3.10
354384
- uv cache prune --ci
355385
artifacts:
356386
- tests/results/*.xml
357387
- coverage.xml
358388

359389
- step:
360-
name: Test Python 3.11
390+
name: Test Python 3.11 (Linux)
361391
image: ghcr.io/astral-sh/uv:latest-python3.11-bookworm-slim
362392
caches:
363393
- uv-deps
364394
- pip-deps
365395
script:
366396
- export UV_CACHE_DIR=.uv-cache
367397
- export UV_LINK_MODE=copy
368-
- uvx nox -s tests-python-311
398+
- uvx nox -s tests-python-3.11
369399
- uv cache prune --ci
370400
artifacts:
371401
- tests/results/*.xml
372402
- coverage.xml
373403

374404
- step:
375-
name: Test Python 3.12
405+
name: Test Python 3.12 (Linux)
376406
image: ghcr.io/astral-sh/uv:latest-python3.12-bookworm-slim
377407
caches:
378408
- uv-deps
379409
- pip-deps
380410
script:
381411
- export UV_CACHE_DIR=.uv-cache
382412
- export UV_LINK_MODE=copy
383-
- uvx nox -s tests-python-312
413+
- uvx nox -s tests-python-3.12
384414
- uv cache prune --ci
385415
artifacts:
386416
- tests/results/*.xml
387417
- coverage.xml
388418

389419
- step:
390-
name: Test Python 3.13
420+
name: Test Python 3.13 (Linux)
391421
image: ghcr.io/astral-sh/uv:latest-python3.13-bookworm-slim
392422
caches:
393423
- uv-deps
394424
- pip-deps
395425
script:
396426
- export UV_CACHE_DIR=.uv-cache
397427
- export UV_LINK_MODE=copy
398-
- uvx nox -s tests-python-313
428+
- uvx nox -s tests-python-3.13
429+
- uv cache prune --ci
430+
artifacts:
431+
- tests/results/*.xml
432+
- coverage.xml
433+
434+
# Cross-platform testing with latest Python
435+
- step:
436+
name: Test Python 3.13 (macOS)
437+
runs-on: macos
438+
script:
439+
- export UV_CACHE_DIR=.uv-cache
440+
- export UV_LINK_MODE=copy
441+
- curl -LsSf https://astral.sh/uv/install.sh | sh
442+
- export PATH="$PATH:$HOME/.cargo/bin"
443+
- uvx nox -s tests-python-3.13
444+
- uv cache prune --ci
445+
artifacts:
446+
- tests/results/*.xml
447+
- coverage.xml
448+
449+
- step:
450+
name: Test Python 3.13 (Windows)
451+
runs-on: windows
452+
script:
453+
- set UV_CACHE_DIR=.uv-cache
454+
- set UV_LINK_MODE=copy
455+
- powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
456+
- uvx nox -s tests-python-3.13
399457
- uv cache prune --ci
400458
artifacts:
401459
- tests/results/*.xml
@@ -466,27 +524,49 @@ pipelines:
466524
- parallel:
467525
steps:
468526
- step:
469-
name: Test Python 3.9
527+
name: Test Python 3.9 (Linux)
470528
image: ghcr.io/astral-sh/uv:latest-python3.9-bookworm-slim
471529
caches:
472530
- uv-deps
473531
- pip-deps
474532
script:
475533
- export UV_CACHE_DIR=.uv-cache
476534
- export UV_LINK_MODE=copy
477-
- uvx nox -s tests-python-39
535+
- uvx nox -s tests-python-3.9
478536
- uv cache prune --ci
479537

480538
- step:
481-
name: Test Python 3.13
539+
name: Test Python 3.13 (Linux)
482540
image: ghcr.io/astral-sh/uv:latest-python3.13-bookworm-slim
483541
caches:
484542
- uv-deps
485543
- pip-deps
486544
script:
487545
- export UV_CACHE_DIR=.uv-cache
488546
- export UV_LINK_MODE=copy
489-
- uvx nox -s tests-python-313
547+
- uvx nox -s tests-python-3.13
548+
- uv cache prune --ci
549+
550+
# Cross-platform testing with latest Python
551+
- step:
552+
name: Test Python 3.13 (macOS)
553+
runs-on: macos
554+
script:
555+
- export UV_CACHE_DIR=.uv-cache
556+
- export UV_LINK_MODE=copy
557+
- curl -LsSf https://astral.sh/uv/install.sh | sh
558+
- export PATH="$PATH:$HOME/.cargo/bin"
559+
- uvx nox -s tests-python-3.13
560+
- uv cache prune --ci
561+
562+
- step:
563+
name: Test Python 3.13 (Windows)
564+
runs-on: windows
565+
script:
566+
- set UV_CACHE_DIR=.uv-cache
567+
- set UV_LINK_MODE=copy
568+
- powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
569+
- uvx nox -s tests-python-3.13
490570
- uv cache prune --ci
491571

492572
{% if cookiecutter.add_rust_extension == 'y' -%}
@@ -503,15 +583,40 @@ pipelines:
503583
tags:
504584
'v*':
505585
- step:
506-
name: Build and Release
586+
name: Build Package
507587
caches:
508588
- uv-deps
509589
- pip-deps
510590
script:
511591
- export UV_CACHE_DIR=.uv-cache
512592
- export UV_LINK_MODE=copy
513593
- uvx nox -s build-python
514-
- uvx nox -s publish-python
515594
- uv cache prune --ci
516595
artifacts:
517-
- dist/**
596+
- dist/**
597+
598+
- step:
599+
name: Publish to TestPyPI
600+
deployment: test
601+
caches:
602+
- uv-deps
603+
- pip-deps
604+
script:
605+
- export UV_CACHE_DIR=.uv-cache
606+
- export UV_LINK_MODE=copy
607+
- export PYPI_URL=https://test.pypi.org/legacy/
608+
- uvx nox -s publish-python
609+
- uv cache prune --ci
610+
611+
- step:
612+
name: Publish to Production PyPI
613+
deployment: production
614+
trigger: manual
615+
caches:
616+
- uv-deps
617+
- pip-deps
618+
script:
619+
- export UV_CACHE_DIR=.uv-cache
620+
- export UV_LINK_MODE=copy
621+
- uvx nox -s publish-python
622+
- uv cache prune --ci

0 commit comments

Comments
 (0)