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
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/prek.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Prek

on:
push:
branches: [main]
pull_request:
Comment thread
chrisguidry marked this conversation as resolved.
Resolved
workflow_call:

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
11 changes: 6 additions & 5 deletions .github/workflows/publish-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ 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

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
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,22 @@ 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

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
Expand Down
33 changes: 5 additions & 28 deletions .github/workflows/ci.yml → .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Python

on:
push:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
32 changes: 0 additions & 32 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
Loading