Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ No runtime dependencies - keep it that way.
- `uv run poe test` - run full test suite (`pytest tests`, `asyncio_mode = "auto"`)
- `uv run poe lint` - `ruff check src/proclet`
- `uv run poe fmt` - `ruff check --select I --fix` + `ruff format`
- `uv run poe ci` - lint + test (what CI runs)
- `uv run poe env:configure` - install pre-commit hooks (ruff, LF line endings, gitlint)
- Lint only covers `src/proclet`; ruff run over `scripts/` or `tests/` reports a few
warnings that CI ignores.
Expand Down Expand Up @@ -62,8 +61,10 @@ No runtime dependencies - keep it that way.
- This is a public repo: describe the library on its own terms.

## CI and release
- `.github/workflows/ci.yml`: push to `main` + PRs, matrix ubuntu/macos/windows x Python 3.12 to 3.15,
`uv sync --locked`, `uv run poe ci`, `uv build`. Keep `uv.lock` committed and in sync.
- `.github/workflows/ci.yml`: push to `main` + PRs, three chained jobs (`needs`): `lint` (ubuntu,
`uv sync --locked` + `uv run poe lint`), `test` (matrix ubuntu/macos/windows x Python
3.12 to 3.15, `uv sync --locked` + `uv run poe test`) and `build` (ubuntu/3.12, `uv build`,
uploads the `dist` artifact). Keep `uv.lock` committed and in sync.
- Actions are pinned by commit SHA with the version in a trailing comment
(`uses: actions/checkout@<sha> # v7.0.1`); bump both together.
- Releases are cut by manually dispatching two workflows on `main`, each running a
Expand All @@ -74,7 +75,7 @@ No runtime dependencies - keep it that way.
sync, which `uv sync --locked` needs) and opens a PR from `feat/pre-release-vX.Y.Z`.
Merge it before going on.
2. `release.yml` (input: next version, `X.Y.Z-dev`) runs CI (`ci.yml` through
`workflow_call`, its ubuntu/3.12 job uploads the `dist` artifact), `release` tags the
`workflow_call`, its `build` job uploads the `dist` artifact), `release` tags the
project version, pushes the tag and creates the GitHub release from the version's
changelog entries (refuses a dev version or a missing entry), publishes `dist` via PyPI
trusted publishing (OIDC, GitHub environment `pypi`, no API token; the job must stay
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ permissions:
contents: read

jobs:
ci:
name: ci (${{ matrix.os }}, py${{ matrix.python }})
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: techcode-io/github-actions/setup-uv@f1054ff1cbac66b5acdc7c4d0d1d38f18a3a6030 # setup-uv/v1
- run: uv sync --locked
- run: uv run poe lint

test:
name: test (${{ matrix.os }}, py${{ matrix.python }})
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -24,10 +33,18 @@ jobs:
with:
python-version: ${{ matrix.python }}
- run: uv sync --locked
- run: uv run poe ci
- run: uv run poe test

build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: techcode-io/github-actions/setup-uv@f1054ff1cbac66b5acdc7c4d0d1d38f18a3a6030 # setup-uv/v1
with:
python-version: "3.12"
- run: uv build
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12'
with:
name: dist
path: dist/
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ You need [Python](https://www.python.org/downloads/) 3.12 or newer and [uv](http
| Lint | `uv run poe lint` | Lints the project code with `ruff`. |
| Format | `uv run poe fmt` | Formats the project code with `ruff`, including the Python examples of the README. |
| Test | `uv run poe test` | Runs the test suite with `pytest`. |
| CI | `uv run poe ci` | Runs lint and tests, as the CI does on Linux, macOS and Windows. |

## Documentation

Expand All @@ -40,7 +39,7 @@ needs [Node.js](https://nodejs.org/). The API reference page is generated from t

## Before opening a pull request

- Run `uv run poe ci`.
- Run `uv run poe lint` and `uv run poe test`: the CI runs the tests on Linux, macOS and Windows.
- Write tests with the helpers of `tests/portable.py` (`py(...)`, `cat()`, `echo()`...) rather than POSIX tools such as `sh` or `cat`, so they run on every platform.
- Keep `proclet` free of runtime dependencies.
- Start commit titles with `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `test`, `chore` or `release`, followed by a colon: `gitlint` checks it.
Expand Down
7 changes: 0 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ sequence = ["docs:api", { cmd = "npm run dev --prefix docs" }]
help = "Build the documentation site into docs/.vitepress/dist."
sequence = ["docs:api", { cmd = "npm run build --prefix docs" }]

[tool.poe.tasks.ci]
sequence = [
"lint",
"test"
]
help = "Run CI automation."

[build-system]
requires = ["uv_build>=0.10.0"]
build-backend = "uv_build"
Loading