mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-05 08:06:19 +00:00
The Python packages ship real test suites that nothing executes. `ci.yml` only covers TypeScript (Bun, turbo check-types, Biome), and the publish-*-python workflows publish to PyPI without running any tests, so these packages are released on the strength of local runs alone. Adds a path-filtered workflow covering the three packages whose suites currently pass: - agent-framework-python installs the package and runs pytest (54 tests) - cartesia-sdk-python and pipecat-sdk-python stub their heavy runtime dependencies at import time, so they run under unittest against the sources with nothing installed Python 3.10 is the lowest version these packages declare, so a change that only works on a newer interpreter fails here. `fail-fast` is disabled so one package failing still reports the others. openai-sdk-python is deliberately left out: its suite cannot be collected against current supermemory, which is issue #1235. It should be added here once that is fixed.
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
name: CI - Python SDK Tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "packages/agent-framework-python/**"
|
|
- "packages/cartesia-sdk-python/**"
|
|
- "packages/pipecat-sdk-python/**"
|
|
- ".github/workflows/ci-python.yml"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.package }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
strategy:
|
|
# Report every package, rather than masking the rest behind the first failure.
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# Has a pytest suite and needs its runtime dependencies installed.
|
|
- package: agent-framework-python
|
|
install: pip install -e . pytest pytest-asyncio
|
|
test: pytest
|
|
# These suites stub their heavy runtime dependencies (cartesia-line,
|
|
# pipecat-ai, loguru) at import time, so they run against the sources
|
|
# with nothing installed and need no install step.
|
|
- package: cartesia-sdk-python
|
|
test: PYTHONPATH=src python -m unittest discover -s tests -v
|
|
- package: pipecat-sdk-python
|
|
test: PYTHONPATH=src python -m unittest discover -s tests -v
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
# The lowest version these packages declare support for, so a change
|
|
# that only works on newer Python is caught here.
|
|
python-version: "3.10"
|
|
cache: pip
|
|
cache-dependency-path: packages/${{ matrix.package }}/pyproject.toml
|
|
|
|
- name: Install dependencies
|
|
if: matrix.install
|
|
working-directory: packages/${{ matrix.package }}
|
|
run: ${{ matrix.install }}
|
|
|
|
- name: Run tests
|
|
working-directory: packages/${{ matrix.package }}
|
|
run: ${{ matrix.test }}
|