diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml index 18c9ccf..a02f4a8 100644 --- a/.github/workflows/_checks.yml +++ b/.github/workflows/_checks.yml @@ -57,6 +57,49 @@ jobs: env: KAFKA_BOOTSTRAP_SERVERS: localhost:9092 + lowest: + # The declared floors are part of what we ship, and nothing else in CI installs + # them: `pytest` and `scheduled` both resolve highest. This leg resolves the lower + # bound instead, on every supported interpreter: a floor's wheel coverage is + # per-interpreter, so two interpreters resolving the same versions can still + # disagree on whether those versions install. + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.11" + - "3.12" + - "3.13" + - "3.14" + services: + redpanda: + image: redpandadata/redpanda:latest + ports: + - 9092:9092 + options: >- + --health-cmd "rpk cluster health" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install ${{ matrix.python-version }} + - run: uv python pin ${{ matrix.python-version }} + # --no-build: a floor with no wheel for this interpreter must fail here rather + # than quietly compile its sdist. Without it the leg passes on a floor that + # still breaks anyone installing into an image with no build toolchain. + - run: uv sync --all-extras --no-install-project --resolution lowest-direct --no-build + # --no-cov: the coverage gate rides the resolved-highest leg in `test-ci`. This + # one asks whether the floors work, which a coverage failure would only obscure. + - run: uv run --no-sync pytest . --no-cov + env: + KAFKA_BOOTSTRAP_SERVERS: localhost:9092 + links: runs-on: ubuntu-latest steps: diff --git a/pyproject.toml b/pyproject.toml index d1393a3..e8daa6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,11 +41,15 @@ Changelog = "https://github.com/modern-python/faststream-concurrent-aiokafka/rel [dependency-groups] dev = [ - "pytest", - "pytest-cov", - "pytest-xdist", - "pytest-asyncio>=0.23.4", - "pytest-randomly", + # Floored so `uv sync --resolution lowest-direct` resolves a usable harness: an + # unbounded name there resolves to the project's first-ever release. + "pytest>=8", + "pytest-cov>=5", + "pytest-xdist>=3", + # 0.24 introduced asyncio_default_fixture_loop_scope, which this project sets: below it + # the setting is an unknown option pytest only warns about. + "pytest-asyncio>=0.24", + "pytest-randomly>=3.15", ] lint = [ "ruff",