Skip to content

Commit c9467bc

Browse files
authored
Update CI: drop EOL jobs, test Python 3.11-3.15, add timeouts (#578)
The test workflow has been failing for reasons unrelated to the code. This PR fixes the workflows and brings them up to date. It is the first of a series of smaller PRs that modernize the project's tooling (the next ones will raise the minimum Python version, switch the build backend and replace black/pylint with Ruff). ## Changes - **Remove the Debian 11 i386 job.** Debian 11 is end-of-life, and its security repository on deb.debian.org no longer serves the packages it lists, so `apt-get install` fails with 404s. - **Test on Python 3.11-3.15** and drop the `numpy==1.26.4` job (NumPy 1.26 is the last release that supports Python 3.9). `uv run` now gets `--python`, so every matrix entry actually runs with its own interpreter (previously the interpreter was installed, but not selected). - **Add a 45 minute timeout to the test job.** Slow PhysioNet downloads made jobs hang until GitHub cancelled them after 6 hours. - **Update actions and the Read the Docs image.** `actions/checkout`, `astral-sh/setup-uv` and the RTD build image (Ubuntu 20.04 is gone) are updated. The docs workflow sets up Python 3.12 explicitly. Dependabot keeps GitHub Actions up to date from now on. - **Replace the stale Poetry instructions** in `DEVELOPING.md` with the uv equivalent. ## Notes - `requires-python` still says `>= 3.9`. The next PR raises it to 3.11 to match what CI tests. - Some tests fail when PhysioNet is slow or unreachable (the failures in the previous CI run were `ChunkedEncodingError`/`ReadTimeout` from physionet.org). This PR does not change that, it only makes sure such a job fails after 45 minutes instead of 6 hours. A later PR makes these tests skip instead of fail. ## Testing I could not run the workflows themselves, but I checked that all YAML files parse, that `uv run --python 3.11` and `--python 3.15` select the requested interpreter, that the docs build with `docs/requirements.txt` on Python 3.12, and that the existing test suite on 3.11 and 3.15 only fails in the 17 tests that need PhysioNet when offline.
2 parents 51599fc + 5e2914d commit c9467bc

6 files changed

Lines changed: 23 additions & 53 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

‎.github/workflows/docs.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ on:
1010

1111
jobs:
1212
docs:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v7
16+
- uses: actions/setup-python@v7
17+
with:
18+
python-version: "3.12"
1619
- name: Install dependencies
1720
run: |
1821
python -m pip install --upgrade pip

‎.github/workflows/style.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
name: Style Check
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: astral-sh/setup-uv@v3
16+
- uses: actions/checkout@v7
17+
- uses: astral-sh/setup-uv@v10.2.0
1818
- name: Install Python
1919
run: uv python install 3.11
2020
- name: Check style

‎.github/workflows/test.yml‎

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,17 @@ on:
1010

1111
jobs:
1212
test:
13-
name: Python ${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.numpy }}
13+
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
os: [windows-latest, ubuntu-latest, macos-latest]
18-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
19-
numpy: ["numpy"]
20-
include:
21-
- os: ubuntu-latest
22-
python-version: "3.9"
23-
numpy: "numpy==1.26.4"
18+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
2419
runs-on: ${{ matrix.os }}
20+
timeout-minutes: 45
2521
steps:
26-
- uses: actions/checkout@v4
27-
- uses: astral-sh/setup-uv@v3
22+
- uses: actions/checkout@v7
23+
- uses: astral-sh/setup-uv@v10.2.0
2824
- name: Install Python ${{ matrix.python-version }}
2925
run: uv python install ${{ matrix.python-version }}
3026
- name: Install libsndfile
@@ -33,34 +29,4 @@ jobs:
3329
- name: Run tests
3430
env:
3531
MPLBACKEND: Agg
36-
run: uv run --with ${{ matrix.numpy }} --extra dev pytest
37-
38-
test-deb11-i386:
39-
name: Python 3.7 on Debian 11 i386
40-
runs-on: ubuntu-latest
41-
container: i386/debian:11
42-
env:
43-
NPY_PROMOTION_STATE: weak_and_warn
44-
steps:
45-
- name: Install dependencies
46-
run: |
47-
apt-get update
48-
apt-get install -y --no-install-recommends \
49-
python3-fsspec \
50-
python3-matplotlib \
51-
python3-numpy \
52-
python3-pandas \
53-
python3-pip \
54-
python3-requests \
55-
python3-scipy \
56-
python3-soundfile \
57-
python3-pytest \
58-
git
59-
python3 --version
60-
# Note: "actions/checkout@v2" requires libstdc++6:amd64 to be
61-
# installed in the container. To keep things simple, use
62-
# "actions/checkout@v1" instead.
63-
# https://github.com/actions/checkout/issues/334
64-
- uses: actions/checkout@v1
65-
- name: Run tests
66-
run: pytest-3
32+
run: uv run --python ${{ matrix.python-version }} --extra dev pytest

‎.readthedocs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
version: 2
44

55
build:
6-
os: "ubuntu-20.04"
6+
os: "ubuntu-24.04"
77
tools:
8-
python: "3.10"
8+
python: "3.12"
99

1010
# Build from the docs/ directory with Sphinx
1111
sphinx:

‎DEVELOPING.md‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,10 @@ uv add <somepackage> --optional <somegroup>
3636

3737
It may be useful to publish to testpypi and preview the changes before publishing to PyPi. However, the project dependencies likely will not be available when trying to install from there.
3838

39-
Setup: configure access to repositories:
39+
Setup: create an API token on PyPI (and on TestPyPI for test uploads) and pass it to uv:
4040

4141
```sh
42-
# Create an API token, then add it
43-
poetry config pypi-token.pypi <my-token>
44-
45-
# For testpypi
46-
poetry config repositories.test-pypi https://test.pypi.org/legacy/
47-
poetry config pypi-token.test-pypi <my-testpypi-token>
42+
export UV_PUBLISH_TOKEN=<my-token>
4843
```
4944

5045
To build and upload a new distribution:

0 commit comments

Comments
 (0)