TST: fix testing on Windows against numpy2 #239
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
strategy: | |
# run all tests even if e.g. image tests fail early | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
# Test all on ubuntu, test ends on macos and windows | |
include: | |
- os: macos-latest | |
python-version: '3.9' | |
- os: windows-latest | |
python-version: '3.9' | |
- os: macos-latest | |
python-version: '3.12' | |
- os: windows-latest | |
python-version: '3.12' | |
- os: ubuntu-20.04 | |
python-version: '3.9' | |
deps: minimal | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- run: | | |
python -m pip install --upgrade pip | |
python -m pip install --requirement test_requirements.txt | |
- if: matrix.deps == 'minimal' | |
run: | | |
pipx run uv pip compile pyproject.toml --resolution=lowest-direct > mindeps.txt | |
python -m pip install --requirement mindeps.txt | |
- name: Build | |
run: python -m pip install --editable "." | |
- run: python -m pip list | |
- name: Run Tests | |
run: pytest --color=yes |