Skip to content

docs: rewrite Celery migration table notes for specificity #352

docs: rewrite Celery migration table notes for specificity

docs: rewrite Celery migration table notes for specificity #352

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect changed paths
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
python: ${{ steps.filter.outputs.python }}
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Filter paths
id: filter
uses: dorny/paths-filter@v4
with:
filters: |
rust:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'rust-toolchain.toml'
- '.github/workflows/ci.yml'
python:
- 'py_src/**'
- 'tests/python/**'
- 'pyproject.toml'
- 'uv.lock'
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/ci.yml'
lint:
name: Lint & Static Analysis
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
- name: Check Rust formatting
run: cargo fmt --all --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.10.12"
cache-dependency-glob: pyproject.toml
- name: Install Python dependencies
run: uv sync --extra dev
- name: Lint Python with Ruff
run: uv run ruff check py_src/ tests/
- name: Check Python formatting with Ruff
run: uv run ruff format --check py_src/ tests/
- name: Type-check Python with mypy
run: uv run mypy py_src/taskito/ tests/python/ --no-incremental
rust-test:
name: Rust Tests (SQLite)
needs: changes
if: needs.changes.outputs.rust == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
save-if: false
- name: Run Rust test suite
run: cargo test --workspace
env:
LD_LIBRARY_PATH: ${{ env.pythonLocation }}/lib
- name: Check build with native-async features
run: cargo check --workspace --features native-async
rust-test-postgres:
name: Rust Tests (PostgreSQL)
needs: changes
if: needs.changes.outputs.rust == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test
POSTGRES_DB: taskito_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
save-if: false
- name: Run Rust test suite (PostgreSQL backend)
run: cargo test --workspace --features postgres
env:
LD_LIBRARY_PATH: ${{ env.pythonLocation }}/lib
TASKITO_POSTGRES_TEST_URL: postgres://postgres:test@localhost:5432/taskito_test
rust-test-redis:
name: Rust Tests (Redis)
needs: changes
if: needs.changes.outputs.rust == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
save-if: false
- name: Run Rust test suite (Redis backend)
run: cargo test --workspace --features redis
env:
LD_LIBRARY_PATH: ${{ env.pythonLocation }}/lib
TASKITO_REDIS_TEST_URL: redis://localhost:6379/15
test:
name: Python Tests (${{ matrix.os }} / Python ${{ matrix.python-version }})
needs: [lint, changes]
if: needs.changes.outputs.python == 'true' || github.event_name == 'push'
runs-on: ${{ matrix.os }}
env:
# setup-python on macOS upgrades certifi via pip; pip's HTTP cache
# occasionally fails to deserialize across runner image versions and
# surfaces as a noisy "Cache entry deserialization failed" annotation.
# Disabling pip's cache eliminates the warning at zero cost (we use uv
# for actual package installs).
PIP_NO_CACHE_DIR: "1"
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: "3.13"
- os: macos-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.10"
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ matrix.os != 'ubuntu-latest' }}
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.10.12"
cache-dependency-glob: pyproject.toml
- name: Install Python dependencies
run: uv sync --extra dev
- name: Build native extension with maturin
uses: PyO3/maturin-action@v1
with:
command: develop
args: --release --features extension-module,postgres,redis,native-async,workflows
- name: Run Python test suite
# The pytest_unconfigure hook in tests/python/conftest.py calls
# ``os._exit(0)`` on a clean run to bypass CPython finalization and
# avoid the PyO3 daemon-thread SIGABRT we used to paper over here.
run: uv run python -m pytest tests/python/ -v --junitxml=test-results.xml
ci-status:
name: CI status
if: always()
needs: [lint, rust-test, rust-test-postgres, rust-test-redis, test]
runs-on: ubuntu-latest
steps:
- name: Check that no required job failed
run: |
results='${{ toJson(needs) }}'
echo "$results"
fail=$(echo "$results" | python3 -c "
import json, sys
data = json.load(sys.stdin)
bad = [k for k, v in data.items() if v['result'] not in ('success', 'skipped')]
print(','.join(bad))
")
if [ -n "$fail" ]; then
echo "::error::Failing or cancelled jobs: $fail"
exit 1
fi