Numpy2 compatibility #13
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
--- | |
# Workflow to test against the latest nightly releases of development | |
# versions of Numpy 2.0 ahead of its upcoming release | |
name: Numpy2 compatibility | |
on: | |
pull_request: | |
branches: | |
- '*' | |
schedule: | |
# Run every day at 8am UTC | |
- cron: 0 8 * * * | |
workflow_dispatch: | |
jobs: | |
test_numpy2: | |
if: github.repository == 'nilearn/nilearn' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout nilearn | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: install and run ruff checks for NPY NPY201 | |
# see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin | |
run: | | |
python -m pip install ruff>0.1.8 | |
ruff check --preview --select NPY201 . | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run test suite | |
run: tox run -e test_numpy2 -- nilearn |