feat: support test-groups (#2063)
* feat: support test-groups Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * refactor: address review comments Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: add a integration test Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Apply suggestions from code review Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com> * fix: better error messages based on feedback Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
Matthieu Darbois
parent
d2c7614c3a
commit
cc1d977359
@@ -1604,6 +1604,40 @@ Platform-specific environment variables are also available:<br/>
|
||||
|
||||
In configuration files, you can use an inline array, and the items will be joined with a comma.
|
||||
|
||||
|
||||
### `CIBW_TEST_GROUPS` {: #test-groups}
|
||||
> Specify test dependencies from your project's `dependency-groups`
|
||||
|
||||
List of
|
||||
[dependency-groups](https://peps.python.org/pep-0735)
|
||||
that should be included when installing the wheel prior to running the
|
||||
tests. This can be used to avoid having to redefine test dependencies in
|
||||
`CIBW_TEST_REQUIRES` if they are already defined in `pyproject.toml`.
|
||||
|
||||
Platform-specific environment variables are also available:<br/>
|
||||
`CIBW_TEST_GROUPS_MACOS` | `CIBW_TEST_GROUPS_WINDOWS` | `CIBW_TEST_GROUPS_LINUX` | `CIBW_TEST_GROUPS_PYODIDE`
|
||||
|
||||
#### Examples
|
||||
|
||||
!!! tab examples "Environment variables"
|
||||
|
||||
```yaml
|
||||
# Will cause the wheel to be installed with these groups of dependencies
|
||||
CIBW_TEST_GROUPS: "test qt"
|
||||
```
|
||||
|
||||
Separate multiple items with a space.
|
||||
|
||||
!!! tab examples "pyproject.toml"
|
||||
|
||||
```toml
|
||||
[tool.cibuildwheel]
|
||||
# Will cause the wheel to be installed with these groups of dependencies
|
||||
test-groups = ["test", "qt"]
|
||||
```
|
||||
|
||||
In configuration files, you can use an inline array, and the items will be joined with a space.
|
||||
|
||||
### `CIBW_TEST_SKIP` {: #test-skip}
|
||||
> Skip running tests on some builds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user