diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4a2ecd..c9391da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,47 @@ name: CI on: pull_request: +# A fixup push makes the run already in flight irrelevant. Cancel it rather +# than paying for six jobs to finish grading superseded code. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - lint-and-test: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.12" + cache: pip + # There is no requirements.txt, so the cache key has to be told + # where the dependency declarations actually live. + cache-dependency-path: pyproject.toml + + # The hooks build their own virtualenvs, and the pytest-smoke hook pulls + # in numpy, SimpleITK and scikit-image to do it. Uncached, that is the + # bulk of this job. + - name: Cache the pre-commit hook environments + uses: actions/cache@v6 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + + - name: Install pre-commit + run: python -m pip install pre-commit + + # Formatting and style do not vary by interpreter, so this runs once + # here rather than once per entry in the test matrix. + - name: Run the hooks + run: pre-commit run --all-files + + test: + name: Test runs-on: ubuntu-latest strategy: fail-fast: false @@ -12,20 +51,19 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml - name: Install dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev,test]" - - name: Run pre-commit - run: pre-commit run --all-files - - name: Run pytest run: pytest -rs diff --git a/.github/workflows/no-medical-images.yml b/.github/workflows/no-medical-images.yml index 945ee3e..4264a0f 100644 --- a/.github/workflows/no-medical-images.yml +++ b/.github/workflows/no-medical-images.yml @@ -14,14 +14,14 @@ jobs: no-medical-images: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: # Keep LFS files as pointers; the check flags those by path anyway # and we must not pull patient data onto the runner. lfs: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: "3.12" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04d019b..bcfc88e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,12 +33,12 @@ jobs: name: Build distributions runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: "3.12" @@ -81,7 +81,7 @@ jobs: - name: Confirm no medical image data was packaged run: python scripts/check_no_medical_images.py --all - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -98,7 +98,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist/ @@ -119,7 +119,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist/ diff --git a/CHANGES.md b/CHANGES.md index 2240bad..f67c30c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0] - unreleased +## [0.3.0] - 2026-11-14 This is the first release since 0.1 and covers roughly 350 commits, so the notes below are grouped by theme rather than listing every change.