diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7326f2e..c52735b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,3 +89,27 @@ jobs: - name: Run pytest with coverage run: uv run pytest --cov=src/pubsub_sdk_python --cov-branch --cov-report=term-missing --cov-fail-under=85 + + examples: + name: Check Examples + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up uv + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 + with: + python-version: "3.14" + enable-cache: true + + - name: Install dependencies + run: | + uv sync --group dev + uv pip install -e . + + - name: Compile examples + run: uv run python -m compileall -q examples + + - name: Run ruff check on examples + run: uv run ruff check examples/ diff --git a/README.md b/README.md index b4e61fe..47b828f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,22 @@ # pubsub-sdk-python +[![PyPI](https://img.shields.io/pypi/v/pubsub-sdk-python)](https://pypi.org/project/pubsub-sdk-python/) +[![Python](https://img.shields.io/pypi/pyversions/pubsub-sdk-python)](https://pypi.org/project/pubsub-sdk-python/) + Python SDK for the **STACKIT PubSub Data Plane API**. This SDK covers the **data plane only** (publish, pull, ack, nack). Creating/deleting topics and subscriptions, and granting publisher/subscriber access, is done via the separate STACKIT PubSub **control plane** REST API (see `tests/integration/conftest.py` for example calls) or the STACKIT Portal. ## Install -Not published to PyPI yet — every GitHub Release publishes `pubsub-sdk-python` to PyPI automatically (see `.github/workflows/release.yml`), so once a release is cut: +The SDK is published to [PyPI](https://pypi.org/project/pubsub-sdk-python/) as `pubsub-sdk-python`. Every GitHub Release publishes a new version automatically (see `.github/workflows/release.yml`); check the badge above or the [releases page](https://github.com/stackitcloud/pubsub-sdk-python/releases) for the latest version. ```bash pip install pubsub-sdk-python # or: uv add pubsub-sdk-python ``` -Until then, install from source with [uv](https://docs.astral.sh/uv/): +To work on the SDK itself, install from source with [uv](https://docs.astral.sh/uv/): ```bash uv sync --group dev