Skip to content

Commit 283536c

Browse files
committed
ci: run tests in cibuildwheel
Previously we weren't running tests against the built wheel. The wheel build could be different from the build used in the tests workflow. Let's test our wheels to add extra confidence about their integrity.
1 parent dcd30ee commit 283536c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/news.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Version History
2121
fragile and there may be unwanted changes. We're optimistic that standardizing
2222
on uv (except for musllinux ppc64le and s390x where uv isn't available)
2323
will lead to more stability over time.
24+
* CI now runs tests against the wheels we distribute. Previously, we ran
25+
tests against a separate build that was theoretically identical. But the
26+
builds may have been subtly different, leading to preventable bugs in our
27+
wheels. (Enabling this test coverage did not uncover any failures.)
2428

2529
0.24.0 (released 2025-08-17)
2630
============================

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,25 @@ build-frontend = "build[uv]"
6565
# Turn compiler warnings into errors.
6666
environment = "ZSTD_WARNINGS_AS_ERRORS=1"
6767

68+
test-command = [
69+
"pytest -v --numprocesses=auto",
70+
"PYTHON_ZSTANDARD_IMPORT_POLICY=cffi pytest -v --numprocesses=auto",
71+
]
72+
test-groups = ["dev"]
73+
test-requires = ["cffi"]
74+
test-sources = ["tests"]
75+
6876
[tool.cibuildwheel.linux]
6977
before-all = "if [ -x /usr/bin/yum ]; then yum install -y libffi-devel; fi"
7078

79+
[tool.cibuildwheel.windows]
80+
# Environment variable syntax is different on Windows.
81+
test-command = [
82+
"pytest -v --numprocesses=auto",
83+
"set PYTHON_ZSTANDARD_IMPORT_POLICY=cffi",
84+
"pytest -v --numprocesses=auto",
85+
]
86+
7187
# This is needed to suppress generation of license-file, which isn't
7288
# compatible with metadata version 2.1, which our pinned setuptools
7389
# version currently uses.

0 commit comments

Comments
 (0)