Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
Comment on lines +11 to +13
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no top-level permissions: block. The default GITHUB_TOKEN permissions can be broader than this job needs (it only checks out code and runs tests). The sibling publish.yml sets permissions: contents: read at the workflow level — worth doing the same here to follow least-privilege. (not blocking)

Suggested change
cancel-in-progress: true
jobs:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read

test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: pyproject.toml lists Programming Language :: Python :: 3.14 in its classifiers, but 3.14 isn't in the test matrix. Either add "3.14" here or drop the 3.14 classifier so the supported-versions story stays consistent. (not blocking)


steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Comment on lines +23 to +28
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the existing publish.yml in this repo pins all third-party actions to commit SHAs with a trailing version comment (e.g. actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6). This workflow uses mutable tag refs (@v4, @v5) instead, which breaks that convention and re-introduces the supply-chain risk that SHA-pinning is intended to mitigate (a compromised tag could push code into CI). Consider pinning to SHAs here too for consistency. (not blocking)


- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-groups

- name: Lint
run: uv run ruff check src tests examples

- name: Test
run: uv run pytest -v
Loading