Skip to content

ci: run the packages/* pytest suites - #492

Open
igor17400 wants to merge 1 commit into
usemoss:mainfrom
igor17400:ci/run-package-tests
Open

ci: run the packages/* pytest suites#492
igor17400 wants to merge 1 commit into
usemoss:mainfrom
igor17400:ci/run-package-tests

Conversation

@igor17400

@igor17400 igor17400 commented Jul 26, 2026

Copy link
Copy Markdown

Pull Request Checklist

Please ensure that your PR meets the following requirements:

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation (if applicable).
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Description

The pytest suites under packages/* ran nowhere: ci.yml covered onlysdks/python/sdk and the langchain cookbook, and the publish-*.yml workflows only smoke-test import <package>.

Adds a python-package-test matrix job covering the 13 packages whose suites currently pass — ~120 tests. Verified locally with the exact commands the job runs:

    cd packages/<pkg>
    uv sync --all-extras --python 3.12
    uv run --no-sync --with pytest --with pytest-asyncio pytest tests -v

Two constraints, both documented in comments in the workflow:

  • Pinned to Python 3.12, not the SDK's 3.10–3.14 matrix. Several connector tests patch moss_connector_<x>.ingest.MossClient, but each package's __init__.py does from .ingest import ingest, shadowing the submodule with the function. unittest.mock resolves that target on 3.12+ and raises AttributeError on 3.10/3.11. Test-only the packages themselves are fine on 3.10.
  • packages/moss-cli is excluded. moss completions bash|zsh exits 1 even when its fallback import succeeds (commands/completions.py), so tests/test_completions.py fails: 2 failed, 28 passed. Worth a follow-up PR that fixes the command and adds moss-cli to the matrix.

Type of Change

CI / tooling — no runtime code changes.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Review in cubic

@CLAassistant

CLAassistant commented Jul 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

Codex review

No issues found.

@HarshaNalluru

Copy link
Copy Markdown
Contributor

@igor17400 please sign the CLA #492 (comment)

@igor17400

Copy link
Copy Markdown
Author

@HarshaNalluru Done!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI coverage for Python package test suites living under packages/*, addressing a gap where these tests were previously not executed in any workflow. This fits the repo’s multi-package structure by ensuring non-SDK Python packages get continuous validation in the main CI pipeline.

Changes:

  • Introduces a new python-package-test GitHub Actions matrix job to run pytest for 13 selected packages under packages/*.
  • Standardizes package test execution via uv sync --all-extras followed by uv run ... pytest tests -v.
  • Pins the job to Python 3.12 and documents exclusions/constraints inline (notably excluding packages/moss-cli).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants