Skip to content

Commit d3caae0

Browse files
committed
ci: add GitHub Actions for tests and PyPI publishing
- test.yml: run pytest on Python 3.11/3.12/3.13 for push and PRs - publish.yml: publish to PyPI via OIDC trusted publishing on release
1 parent bed7da6 commit d3caae0

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: pypi
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: astral-sh/setup-uv@v4
18+
19+
- run: uv build
20+
21+
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11", "3.12", "3.13"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: astral-sh/setup-uv@v4
19+
20+
- run: uv python install ${{ matrix.python-version }}
21+
22+
- run: uv sync --dev
23+
24+
- run: uv run pytest

0 commit comments

Comments
 (0)