Skip to content

Test against numpy 2.0 #284

Test against numpy 2.0

Test against numpy 2.0 #284

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, ubuntu-latest, macos-latest]
experimental: [false]
# Oldest one based on NEP-29 and latest one.
# See https://numpy.org/neps/nep-0029-deprecation_policy.html
numpy-version: ["1.23", "1.26"]
exclude:
- python-version: "3.12"
numpy-version: "1.23"
include:
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup Micromamba Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }}
uses: mamba-org/setup-micromamba@v1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge
- name: Install unstable dependencies
if: matrix.experimental == true
run: |
python -m pip install \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \
--trusted-host pypi.anaconda.org \
--no-deps --pre --upgrade \
numpy scipy pandas;
python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall
- name: Install gsw
if: matrix.experimental != true
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
run: |
python -m pytest -s -rxs -v gsw/tests