Update python_requires
and test matrix to support Python 3.11+
#737
Workflow file for this run
This file contains hidden or 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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/tests.yml | |
- pyproject.toml | |
- s2fft/** | |
- tests/** | |
- .coveragerc | |
- CMakesLists.txt | |
schedule: | |
- cron: 0 0 * * 0 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12", "3.13"] | |
os: [ubuntu-latest, macos-latest] | |
fail-fast: false | |
env: | |
CMAKE_POLICY_VERSION_MINIMUM: 3.5 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- if: matrix.os == 'macos-latest' | |
name: Set up Miniforge on MacOS | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
python-version: ${{ matrix.python-version }} | |
- if: matrix.os == 'macos-latest' | |
name: Install dependencies with conda on MacOS | |
# Avoid OpenMP runtime incompatibility when using PyPI wheels | |
# by installing torch and healpy using conda | |
# https://github.com/healpy/healpy/issues/1012 | |
run: | | |
conda install jax "jax>=0.3.13,<0.6.0" "numpy>=1.20,<2" ducc0 healpy pytorch pytest pytest-cov | |
python -m pip install --upgrade pip | |
pip install --no-deps so3 pyssht | |
pip install --no-deps . | |
- if: matrix.os != 'macos-latest' | |
name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- if: matrix.os != 'macos-latest' | |
name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[tests] | |
- name: Run tests | |
run: | | |
pytest -v --cov-report=xml --cov=s2fft --cov-config=.coveragerc | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |