Skip to content

Commit

Permalink
ci: unittest with various numpy version
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-su committed Apr 10, 2024
1 parent 02a685d commit 1dc4d76
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:

jobs:
test:
name: Test on ${{ matrix.os }}, ${{ matrix.install_from }}
name: Test on ${{ matrix.os }}, ${{ matrix.install_from }}, ${{ matrix.numpy }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
install_from: [source, source_with_pre, sdist]
install_from: [source, sdist]
numpy: [oldest-supported-numpy, numpy<2, numpy>=2.0.0rc1]

steps:
- uses: actions/checkout@v4
Expand All @@ -29,17 +30,17 @@ jobs:
if: matrix.install_from == 'source'
run: pip install ./PythonAPI

- name: Install from source with prerelease.
if: matrix.install_from == 'source_with_pre'
# This tests compatibility with pre-release dependencies
run: pip install --pre ./PythonAPI

- name: Install from sdist
if: matrix.install_from == 'sdist'
shell: bash
run: |
pipx run build --sdist ./PythonAPI
pip install ./PythonAPI/dist/*.tar.gz
- name: Install numpy
run: |
pip install ${{ matrix.numpy }}
python -c "import numpy as np; print(np.__version__)"
- name: Run test cases
run: python tests/test_cases.py

0 comments on commit 1dc4d76

Please sign in to comment.