Skip to content

Commit 657d6ee

Browse files
committed
fix: workflow
1 parent 0ba1475 commit 657d6ee

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/run_tests.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ permissions:
1313

1414
jobs:
1515
build:
16-
name: Python ${{ matrix.python-version }} - ${{ matrix.numpy-constraints }}
16+
name: Python ${{ matrix.python-version }} - NumPy ${{ matrix.numpy-major }}.x
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
2020
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
21-
numpy-constraints: ["numpy>=1.25,<2 scipy<1.18", "numpy>=2"] # scipy>=1.18 is not supported on numpy<2
21+
numpy-major: ["1", "2"]
2222
exclude:
2323
- python-version: "3.13" # numpy<2 is not supported on 3.13+
24-
numpy-constraints: "numpy>=1.25,<2 scipy<1.18"
24+
numpy-major: "1"
2525
- python-version: "3.14"
26-
numpy-constraints: "numpy>=1.25,<2 scipy<1.18"
26+
numpy-major: "1"
2727
- python-version: "3.14t"
28-
numpy-constraints: "numpy>=1.25,<2 scipy<1.18"
28+
numpy-major: "1"
2929

3030
steps:
3131
- uses: actions/checkout@v3
@@ -36,7 +36,12 @@ jobs:
3636
- name: Install test dependencies
3737
run: |
3838
uv sync --extra dev
39-
uv pip install {{ matrix.numpy-constraints }}
39+
- name: Install NumPy 1.x compatibility dependencies
40+
if: matrix.numpy-major == '1'
41+
run: uv pip install "numpy>=1.25,<2" "scipy<1.18" # scipy>=1.18 is not supported on numpy<2
42+
- name: Install NumPy 2.x compatibility dependencies
43+
if: matrix.numpy-major == '2'
44+
run: uv pip install "numpy>=2"
4045
- name: Run pytest
4146
run: uv run --no-sync pytest --cov-report xml --cov=bayes_opt/
4247
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)