From ed5932f3253d92359f915692877657a8a676eaf4 Mon Sep 17 00:00:00 2001 From: vivekvar-dl Date: Sat, 8 Aug 2026 13:11:14 +0530 Subject: [PATCH] ci: run Python package test suites on pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The four Python packages ship ~108 test functions and none run in CI — ci.yml is TypeScript-only and the publish workflows build without testing, so packages are released on whatever the author ran locally (#1235 shipped exactly this way). Add a path-filtered workflow that runs pytest for the three packages whose suites currently pass: pipecat and cartesia install with --no-deps since their tests stub the heavy runtime dependencies, and agent-framework pins agent-framework-core==1.0.0rc3 because later releases dropped BaseContextProvider and break the package's imports. openai-sdk-python is excluded until its import against recent supermemory releases is fixed (#1235). Fixes #1417 --- .github/workflows/python-tests.yml | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 000000000..dbe74b542 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,69 @@ +name: Python Package Tests + +on: + pull_request: + paths: + - "packages/pipecat-sdk-python/**" + - "packages/cartesia-sdk-python/**" + - "packages/agent-framework-python/**" + - ".github/workflows/python-tests.yml" + push: + branches: + - main + paths: + - "packages/pipecat-sdk-python/**" + - "packages/cartesia-sdk-python/**" + - "packages/agent-framework-python/**" + - ".github/workflows/python-tests.yml" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: pytest (${{ matrix.package }}) + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + include: + # pipecat and cartesia stub their heavy runtime dependencies inside + # the test suite, so their suites run without installing them. + - package: pipecat-sdk-python + install: | + pip install --no-deps -e . + pip install pytest pytest-asyncio + - package: cartesia-sdk-python + install: | + pip install --no-deps -e . + pip install pytest pytest-asyncio + - package: agent-framework-python + # agent-framework-core releases after 1.0.0rc3 no longer export + # BaseContextProvider, which breaks this package's imports — pin + # the rc until the package supports current releases. + install: | + pip install -e . pytest pytest-asyncio python-dotenv + pip install agent-framework-core==1.0.0rc3 + defaults: + run: + working-directory: ./packages/${{ matrix.package }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install package and test dependencies + run: ${{ matrix.install }} + + - name: Run tests + run: python -m pytest tests/ -v + +# openai-sdk-python also ships a test suite, but it currently fails to import +# against recent `supermemory` releases (#1235). Add it to the matrix once +# that is fixed.