Skip to content
Open
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
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# =============================================================================
# SochDB Python SDK — Continuous Integration
# =============================================================================
#
# Runs on every push to main and every pull request against main. Each matrix
# cell runs:
#
# - `ruff check` on the E9 / F63 / F7 rule sets (syntax + logic errors)
# - `python -m compileall` (per-Python-version syntax coverage)
# - `import sochdb` smoke test (guards against module-level breakage)
#
# We deliberately do NOT run the full pytest suite here: the tests exercise the
# embedded FFI path, which needs the pre-built Rust libraries from the
# sochdb/sochdb release page (see release.yml for how those are downloaded).
# Wiring that up is left to a follow-up CI PR.
#
# The matrix covers every Python version listed in pyproject.toml's classifiers
# (3.9 through 3.13). Ubuntu-only because, without native binaries, additional
# OSes add cost without signal.
# =============================================================================

name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
python-matrix:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install SDK (editable) and dev dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Ruff — syntax and logic checks
run: |
ruff check \
--select E9,F63,F7 \
--exclude "src/sochdb/sochdb_pb2.py,src/sochdb/sochdb_pb2_grpc.py,src/sochdb/proto/*_pb2*.py" \
src/ tests/

- name: Byte-compile source
run: python -m compileall -q src/sochdb

- name: Import smoke test (native FFI is lazy — no binary needed)
run: |
python -c "import sochdb; print('sochdb', sochdb.__version__, 'core', sochdb.__core_version__)"
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to the SochDB Python SDK will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **CI workflow** (`.github/workflows/ci.yml`) — runs on every push to `main`
and every pull request against `main`, matrixed across Python 3.9–3.13. Each
cell runs `ruff check` on the `E9`/`F63`/`F7` rule sets, `python -m compileall`
for per-version syntax coverage, and an `import sochdb` smoke test. Does not
yet run the full pytest suite (that requires the pre-built Rust FFI libraries
from the `sochdb/sochdb` release page — follow-up CI PR).
- **CI status badge** in `README.md` linking to the workflow.
- **`ruff>=0.5`** added to the `[dev]` extras so `pip install -e ".[dev]"`
installs the same linter CI runs.

## [0.8.1] - 2026-06-24

### Changed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SochDB Python SDK

[![CI](https://github.com/sochdb/sochdb-python-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/sochdb/sochdb-python-sdk/actions/workflows/ci.yml)

**Dual-mode architecture: Embedded (FFI) + Server (gRPC/IPC)**
Choose the deployment mode that fits your needs.

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"faker>=18.0",
"ruff>=0.5",
]
all = [
"posthog>=3.0.0",
Expand Down