Skip to content

Commit 08d7f5d

Browse files
authored
Expand test coverage with comprehensive test suite (#48)
1 parent 9533ab3 commit 08d7f5d

36 files changed

+7003
-163
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,36 @@ on:
1212
- main
1313

1414
jobs:
15+
unit_tests:
16+
if: github.event_name == 'pull_request'
17+
name: Unit tests on ${{ matrix.os }} / Python ${{ matrix.python }}
18+
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 30
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest, macos-14, windows-latest]
24+
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python }}
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip wheel setuptools
35+
python -m pip install numpy pytest
36+
- name: Build and install
37+
run: python -m pip install -e .
38+
- name: Run tests
39+
run: pytest tests -vv
40+
1541
build_wheels:
1642
name: Build wheels on ${{ matrix.os }}
1743
runs-on: ${{ matrix.os }}
44+
timeout-minutes: 90
1845
strategy:
1946
# Ensure that a wheel builder finishes even if another fails
2047
fail-fast: false
@@ -286,12 +313,14 @@ jobs:
286313
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux_image }}
287314
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
288315
CIBW_BEFORE_BUILD: pip install pybind11
289-
CIBW_TEST_COMMAND: python {project}/tests/_ci_debug_import.py && pytest {project}/tests -vv
290-
CIBW_TEST_COMMAND_WINDOWS: python {project}\tests\_ci_debug_import.py && pytest {project}\tests -vv
316+
CIBW_TEST_COMMAND: python {project}/tests/_ci_test_runner.py
317+
CIBW_TEST_COMMAND_WINDOWS: python {project}\tests\_ci_test_runner.py
291318
CIBW_TEST_REQUIRES: pytest numpy
319+
CIBW_TEST_SKIP: ${{ github.event_name == 'pull_request' && '*' || '' }}
292320
CIBW_BUILD_VERBOSITY: 1
293321
CIBW_ARCHS: ${{ matrix.arch }}
294322
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
323+
CIBW_ENVIRONMENT: CIBW_PLATFORM_ID=${{ matrix.platform_id }}
295324
- uses: actions/upload-artifact@v4
296325
with:
297326
name: wheels-${{ matrix.platform_id }}-py${{ matrix.python }}

0 commit comments

Comments
 (0)