Skip to content

Commit

Permalink
CI: test multiple numpy/scipy versions on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed May 27, 2024
1 parent aa4e36d commit 971d328
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,51 @@ jobs:
path: ./dist/*.whl

build_sdist:
name: sdist and coveralls
runs-on: ubuntu-latest

name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }} scipy${{ matrix.ver.sp }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
ver:
- {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
- {py: '3.9', np: '==1.20.0', sp: '==1.5.4'}
- {py: '3.10', np: '==1.21.6', sp: '==1.7.2'}
- {py: '3.11', np: '==1.23.2', sp: '==1.9.2'}
- {py: '3.12', np: '==1.26.2', sp: '==1.11.2'}
- {py: '3.12', np: '>=2.0.0rc1', sp: '>=1.13.0'}
exclude:
- os: macos-14
ver: {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
- os: macos-14
ver: {py: '3.9', np: '==1.20.0', sp: '==1.5.4'}
- os: macos-14
ver: {py: '3.10', np: '==1.21.6', sp: '==1.7.2'}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Set up Python 3.9
- name: Set up Python ${{ matrix.ver.py }}
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ matrix.ver.py }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build coveralls>=3.0.0
pip install build "coveralls>=3.0.0"
- name: Install PyKrige
run: |
pip install -v --editable .[test]
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
python -m pytest --cov pykrige --cov-report term-missing -v tests/
python -m coveralls --service=github
Expand All @@ -100,6 +122,7 @@ jobs:
python -m build --sdist --outdir dist .
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.9'
with:
path: dist/*.tar.gz

Expand Down

0 comments on commit 971d328

Please sign in to comment.