From 8632a9d2bb5d2b47712473b002934f2fd132c568 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:42:19 +0530 Subject: [PATCH 1/2] Test against NumPy nightlies --- .github/workflows/test.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc95b1cf..5b7e78d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,7 @@ concurrency: jobs: test: - # name: Test / ${{ matrix.platform }} / Nightly ${{ matrix.nightly[0] }} / Python ${{ matrix.python-version }} - name: Test / ${{ matrix.platform }} / Python ${{ matrix.python-version }} + name: Test / ${{ matrix.platform }} / Nightly ${{ matrix.nightly[0] }} / Python ${{ matrix.python-version }} runs-on: ${{ matrix.platform }} strategy: fail-fast: false @@ -30,8 +29,7 @@ jobs: platform: [ubuntu-latest, macos-13, macos-latest, windows-latest] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] - # TODO: disable nightly NumPy tests for now, re-enable later - # nightly: [[True, "nightly-"], [False, ""]] + nightly: [[True, "nightly-"], [False, ""]] steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5.1.1 @@ -41,10 +39,8 @@ jobs: - name: Run CPython tests if: ${{ !startsWith(matrix.python-version, 'pypy') }} - # run: uvx nox -s ${{ matrix.nightly[1] }}tests run: uvx nox -s tests - name: Run PyPy tests if: ${{ startsWith(matrix.python-version, 'pypy') }} - # run: uvx nox -s ${{ matrix.nightly[1] }}tests - run: uvx nox -s tests + run: uvx nox -s ${{ matrix.nightly[1] }}tests From 1b0c3da26dc14ac47ddefc0b3008246b11ea3ff7 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:59:55 +0530 Subject: [PATCH 2/2] Split into a nightly test job, rework the workflow --- .github/workflows/test.yml | 50 ++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b7e78d7..020c7a44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,15 +21,23 @@ concurrency: jobs: test: - name: Test / ${{ matrix.platform }} / Nightly ${{ matrix.nightly[0] }} / Python ${{ matrix.python-version }} + name: Regular tests / ${{ matrix.platform }} / Python ${{ matrix.python-version }} runs-on: ${{ matrix.platform }} strategy: fail-fast: false matrix: platform: [ubuntu-latest, macos-13, macos-latest, windows-latest] python-version: - ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] - nightly: [[True, "nightly-"], [False, ""]] + [ + "3.8", + "3.9", + "3.10", + "3.11", + "3.12", + "3.13", + "pypy-3.9", + "pypy-3.10", + ] steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5.1.1 @@ -37,10 +45,36 @@ jobs: python-version: ${{ matrix.python-version }} - uses: yezz123/setup-uv@v4 - - name: Run CPython tests - if: ${{ !startsWith(matrix.python-version, 'pypy') }} + # On PyPy, we skip SciPy because we don't have wheels + # available, see noxfile.py for more details. + - name: Run tests run: uvx nox -s tests - - name: Run PyPy tests - if: ${{ startsWith(matrix.python-version, 'pypy') }} - run: uvx nox -s ${{ matrix.nightly[1] }}tests + # In this job, we test against the NumPy nightly wheels hosted on + # https://anaconda.org/scientific-python-nightly-wheels/numpy + # on the latest Python version available across platforms, instead of + # testing all Python versions and implementations on all platforms. + # We do not test on PyPy. + # + # However, "nox -s nightly-tests" can be used locally anywhere, on + # any Python version and implementation on any platform and we leave + # it to the user to decide what Python version to test against, which + # might or might not have a corresponding NumPy nightly wheel present. + nightlies: + name: Nightly tests / ${{ matrix.platform }} / Python ${{ matrix.python-version }} + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-13, macos-latest, windows-latest] + python-version: ["3.x"] + + steps: + - uses: actions/checkout@v4.1.7 + - uses: actions/setup-python@v5.1.1 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + - uses: yezz123/setup-uv@v4 + - name: Run tests against nightly wheels for NumPy and SciPy + run: uvx nox -s nightly-tests