From 92518a1e902f7e52b4f8058d78f1987e1662e147 Mon Sep 17 00:00:00 2001 From: Chris Guidry Date: Tue, 6 Oct 2026 17:43:59 -0400 Subject: [PATCH 1/3] Name the Python workflow and its jobs the way the Rust ones are named The Python workflow was still called CI and its jobs had no language in their names first, as if Python were the repository's default and Rust an addition. The workflow is now Python, beside Rust, and each job's name starts with its Python version, the way the Rust jobs start with Rust. The chaos run names its implementations, as the Rust one does. Prek lints every language's files, so it moves to a workflow of its own and keeps its name. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y2QtufEUxxm9XgTqCWySHG --- .github/workflows/conformance.yml | 2 +- .github/workflows/prek.yml | 35 ++++++++++++++++++++++++ .github/workflows/publish.yml | 4 +-- .github/workflows/{ci.yml => python.yml} | 33 ++++------------------ README.md | 2 +- docs/index.md | 2 +- python/README.md | 2 +- 7 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/prek.yml rename .github/workflows/{ci.yml => python.yml} (91%) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 433dbbb7..0c3791b6 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -101,7 +101,7 @@ jobs: run: uv run python -m conformance telemetry --implementation python@main --implementation rust@main chaos: - name: Chaos tests + name: Chaos tests, python@main and python@release runs-on: ubuntu-26.04 timeout-minutes: 6 diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml new file mode 100644 index 00000000..c2b224d7 --- /dev/null +++ b/.github/workflows/prek.yml @@ -0,0 +1,35 @@ +name: Prek + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +# The hooks lint every language's files and the tools at the root, so they +# run in a workflow of their own rather than in one language's. +jobs: + prek: + name: Prek checks + runs-on: ubuntu-26.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + + - name: Install uv and set Python version + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.10" + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Install dependencies + run: uv sync + + - name: Run prek + uses: j178/prek-action@v2 + env: + # The Rust workflow runs rustfmt and clippy with its own toolchain. + SKIP: rustfmt,clippy diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 078d44b5..7260b505 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,11 +9,11 @@ permissions: jobs: ci: - name: Run CI + name: Run the Python workflow # pydocket releases are tagged python/v0.27.0, or bare before the # monorepo. Another language's release does not publish to PyPI. if: startsWith(github.event.release.tag_name, 'python/v') || !contains(github.event.release.tag_name, '/') - uses: ./.github/workflows/ci.yml + uses: ./.github/workflows/python.yml publish: name: Build and publish to PyPI diff --git a/.github/workflows/ci.yml b/.github/workflows/python.yml similarity index 91% rename from .github/workflows/ci.yml rename to .github/workflows/python.yml index 9628ca5e..f1ace0d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/python.yml @@ -1,4 +1,4 @@ -name: CI +name: Python on: push: @@ -11,7 +11,7 @@ permissions: jobs: test: - name: Core, Python ${{ matrix.python-version }}, ${{ matrix.backend.name }} + name: Python ${{ matrix.python-version }}, ${{ matrix.backend.name }} runs-on: ubuntu-26.04 timeout-minutes: 5 defaults: @@ -113,7 +113,7 @@ jobs: report_type: test_results test-cli: - name: CLI, Python ${{ matrix.python-version }} + name: Python ${{ matrix.python-version }}, CLI runs-on: ubuntu-26.04 timeout-minutes: 4 defaults: @@ -165,7 +165,7 @@ jobs: report_type: test_results test-windows: - name: Windows, Python ${{ matrix.python-version }} + name: Python ${{ matrix.python-version }}, Windows runs-on: windows-latest timeout-minutes: 6 defaults: @@ -213,7 +213,7 @@ jobs: report_type: test_results test-redis-py: - name: redis-py ${{ matrix.redis-py.name }}, Python 3.14, Redis 8.10 + name: Python 3.14, Redis 8.10, redis-py ${{ matrix.redis-py.name }} runs-on: ubuntu-26.04 timeout-minutes: 4 defaults: @@ -266,26 +266,3 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} report_type: test_results - - prek: - name: Prek checks - runs-on: ubuntu-26.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v7 - - - name: Install uv and set Python version - uses: astral-sh/setup-uv@v7 - with: - python-version: "3.10" - enable-cache: true - cache-dependency-glob: "uv.lock" - - - name: Install dependencies - run: uv sync - - - name: Run prek - uses: j178/prek-action@v2 - env: - # The Rust workflow runs rustfmt and clippy with its own toolchain. - SKIP: rustfmt,clippy diff --git a/README.md b/README.md index 233f997e..d63ecab7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ on the scheduling of future work as seamlessly and efficiently as immediate work [![PyPI - Version](https://img.shields.io/pypi/v/pydocket)](https://pypi.org/project/pydocket/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydocket)](https://pypi.org/project/pydocket/) -[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions/workflows/ci.yml) +[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions) [![Codecov](https://img.shields.io/codecov/c/github/chrisguidry/docket)](https://app.codecov.io/gh/chrisguidry/docket) [![PyPI - License](https://img.shields.io/pypi/l/pydocket)](https://github.com/chrisguidry/docket/blob/main/LICENSE) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docket.lol/) diff --git a/docs/index.md b/docs/index.md index 6e464ef1..b1d6cd78 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,7 +5,7 @@ on the scheduling of future work as seamlessly and efficiently as immediate work [![PyPI - Version](https://img.shields.io/pypi/v/pydocket)](https://pypi.org/project/pydocket/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydocket)](https://pypi.org/project/pydocket/) -[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions/workflows/ci.yml) +[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions) [![Codecov](https://img.shields.io/codecov/c/github/chrisguidry/docket)](https://app.codecov.io/gh/chrisguidry/docket) [![PyPI - License](https://img.shields.io/pypi/l/pydocket)](https://github.com/chrisguidry/docket/blob/main/LICENSE) diff --git a/python/README.md b/python/README.md index 233f997e..d63ecab7 100644 --- a/python/README.md +++ b/python/README.md @@ -3,7 +3,7 @@ on the scheduling of future work as seamlessly and efficiently as immediate work [![PyPI - Version](https://img.shields.io/pypi/v/pydocket)](https://pypi.org/project/pydocket/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydocket)](https://pypi.org/project/pydocket/) -[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions/workflows/ci.yml) +[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions) [![Codecov](https://img.shields.io/codecov/c/github/chrisguidry/docket)](https://app.codecov.io/gh/chrisguidry/docket) [![PyPI - License](https://img.shields.io/pypi/l/pydocket)](https://github.com/chrisguidry/docket/blob/main/LICENSE) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docket.lol/) From e02adf53494319106fd22e5523cfaf315357408d Mon Sep 17 00:00:00 2001 From: Chris Guidry Date: Tue, 6 Oct 2026 17:45:50 -0400 Subject: [PATCH 2/3] Run the Rust workflow on every pull request The Rust jobs skipped themselves on a pull request that changed no Rust, which let a required check pass without running. That works for a single job, but a skipped matrix job reports its name unexpanded, so a required `Rust, Memory` would never arrive and every Python-only pull request would wait on it. The Rust checks are about to be required, so they now run every time. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y2QtufEUxxm9XgTqCWySHG --- .github/workflows/publish-rust.yml | 4 ---- .github/workflows/rust.yml | 32 ------------------------------ 2 files changed, 36 deletions(-) diff --git a/.github/workflows/publish-rust.yml b/.github/workflows/publish-rust.yml index 97681a9f..dcdc6153 100644 --- a/.github/workflows/publish-rust.yml +++ b/.github/workflows/publish-rust.yml @@ -14,12 +14,8 @@ jobs: if: startsWith(github.event.release.tag_name, 'rust/v') uses: ./.github/workflows/rust.yml secrets: inherit - # A called workflow can ask for no more than its caller grants, and - # GitHub refuses the whole run at startup if one of its jobs does, even - # a job that skips itself on a release. permissions: contents: read - pull-requests: read publish: name: Publish docket-rs to crates.io diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 21ff5741..2bd3ffb4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,36 +11,8 @@ permissions: contents: read jobs: - # A skipped job counts as passed for a required check, so on a pull request - # the jobs below skip themselves when nothing they test changed, instead of - # the workflow not running at all. Pushes and releases run everything. - changes: - name: Rust changes - if: github.event_name == 'pull_request' - runs-on: ubuntu-26.04 - timeout-minutes: 5 - permissions: - pull-requests: read - outputs: - rust: ${{ steps.filter.outputs.rust }} - steps: - - uses: actions/checkout@v7 - - - uses: dorny/paths-filter@v4 - id: filter - with: - filters: | - rust: - - "rust/**" - - "protocol/**" - - "conformance/**" - - "python/tests/cluster/**" - - ".github/workflows/rust.yml" - lint: name: Rust lints - needs: changes - if: ${{ !cancelled() && (github.event_name != 'pull_request' || needs.changes.outputs.rust == 'true') }} runs-on: ubuntu-26.04 timeout-minutes: 15 defaults: @@ -70,8 +42,6 @@ jobs: test: name: Rust, ${{ matrix.backend.name }} - needs: changes - if: ${{ !cancelled() && (github.event_name != 'pull_request' || needs.changes.outputs.rust == 'true') }} runs-on: ubuntu-26.04 timeout-minutes: 15 strategy: @@ -107,8 +77,6 @@ jobs: coverage: name: Rust coverage - needs: changes - if: ${{ !cancelled() && (github.event_name != 'pull_request' || needs.changes.outputs.rust == 'true') }} runs-on: ubuntu-26.04 timeout-minutes: 20 defaults: From a9057996d6208b49d6b5bc2ad8d3f559e1163714 Mon Sep 17 00:00:00 2001 From: Chris Guidry Date: Tue, 6 Oct 2026 17:48:00 -0400 Subject: [PATCH 3/3] Gate both releases on the Prek workflow Prek moved out of the workflow that the PyPI release calls, so a release could publish a commit whose hooks failed. The Prek workflow can now be called, and both the PyPI and the crates.io releases wait for it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y2QtufEUxxm9XgTqCWySHG --- .github/workflows/prek.yml | 1 + .github/workflows/publish-rust.yml | 7 ++++++- .github/workflows/publish.yml | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index c2b224d7..f2825830 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -4,6 +4,7 @@ on: push: branches: [main] pull_request: + workflow_call: permissions: contents: read diff --git a/.github/workflows/publish-rust.yml b/.github/workflows/publish-rust.yml index dcdc6153..41e9cead 100644 --- a/.github/workflows/publish-rust.yml +++ b/.github/workflows/publish-rust.yml @@ -17,11 +17,16 @@ jobs: permissions: contents: read + prek: + name: Run the Prek workflow + if: startsWith(github.event.release.tag_name, 'rust/v') + uses: ./.github/workflows/prek.yml + publish: name: Publish docket-rs to crates.io runs-on: ubuntu-26.04 timeout-minutes: 15 - needs: rust + needs: [rust, prek] environment: name: crates-io url: https://crates.io/crates/docket-rs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7260b505..0b8d8072 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,11 +15,16 @@ jobs: if: startsWith(github.event.release.tag_name, 'python/v') || !contains(github.event.release.tag_name, '/') uses: ./.github/workflows/python.yml + prek: + name: Run the Prek workflow + if: startsWith(github.event.release.tag_name, 'python/v') || !contains(github.event.release.tag_name, '/') + uses: ./.github/workflows/prek.yml + publish: name: Build and publish to PyPI runs-on: ubuntu-26.04 timeout-minutes: 10 - needs: ci + needs: [ci, prek] environment: name: pypi url: https://pypi.org/p/pydocket