Skip to content

build: require Python 3.11, test 3.11/3.14, fix setuptools comments #13

build: require Python 3.11, test 3.11/3.14, fix setuptools comments

build: require Python 3.11, test 3.11/3.14, fix setuptools comments #13

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: pytest (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# Lowest and highest Python allowed by requires-python.
python-version: ["3.11", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked
# The tutorial-pipeline tests need the `elements` extra, a DataJoint
# MySQL server and the example ephys dataset, none of which exist here,
# so they skip with a reason. The import smoke tests always run.
- name: Run tests
run: uv run --locked pytest
audit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
enable-cache: true
# Audits the locked tree against OSV and fails on any finding. `--locked`
# also asserts uv.lock is up to date with pyproject.toml.
#
# GHSA-h35f-9h28-mq5c (alias PYSEC-2026-3447; setuptools sdist MANIFEST.in
# exclusion bypass, fixed in 83.0.0) is ignored on purpose: setuptools
# 82 removed pkg_resources, which datajoint<2 imports at module scope, so
# the dev environment is constrained to setuptools<82 (see [tool.uv] in
# pyproject.toml). The flaw is in building sdists on macOS filesystems,
# which nothing in this environment does.
- name: Audit dependencies
run: uv audit --locked --ignore GHSA-h35f-9h28-mq5c