Skip to content

ci: run Python SDK and sample regression tests - #325

Draft
arjun2075 wants to merge 2 commits into
google-agentic-commerce:mainfrom
arjun2075:ci/python-tests
Draft

ci: run Python SDK and sample regression tests#325
arjun2075 wants to merge 2 commits into
google-agentic-commerce:mainfrom
arjun2075:ci/python-tests

Conversation

@arjun2075

Copy link
Copy Markdown

Description

The Python SDK tests (code/sdk/python/ap2/tests/) and the sample regression tests
(code/samples/python/tests/) are not currently executed by any GitHub Actions
workflow, so regressions in either suite are only caught when a contributor runs
pytest locally.

This PR adds a single Python 3.12 CI job that syncs the AP2 uv workspace once and
then runs both suites.

What this changes

  • adds .github/workflows/python-tests.yml — one job, on pushes to main and pull
    requests targeting main
  • syncs once with uv sync --all-packages, then runs both suites with
    uv run --no-sync so they reuse that environment instead of re-resolving per step

What this deliberately does not change

  • no SDK, sample, or protocol behavior
  • no dependency-locking policy change. AP2 currently has no committed uv.lock
    (removed in fix: remove uvlock #246), so the workflow resolves the workspace at run time, matching the
    repository's current setup. This PR does not reintroduce a lockfile.
  • no paths: filter initially, so the check behaves predictably on every PR rather
    than depending on workflow-level path skipping. Straightforward to narrow if
    maintainers prefer lower CI usage.
  • no Python version matrix. The project supports 3.11+; 3.12 keeps this first version
    small, and a minimum-supported-version matrix is a reasonable follow-up.

Workflow hardening

Third-party actions are pinned to immutable commit SHAs, persist-credentials: false
is set on checkout, workflow permissions are contents: read, and the job is bounded
with timeout-minutes: 15. These are defensive choices rather than an existing
repository-wide requirement.

Current status — draft

This is opened as a draft because the checks are expected to be red on the current
main baseline:

Local run on Python 3.12 against this branch: SDK suite 186 passed / 2 failed (the two
above), sample suite 0 collected. This PR intentionally does not modify kb_sd_jwt,
the failing tests, or #310 — it only adds the workflow. Once #310 and #313 land, this
branch will be rebased so the check can be evaluated against a green baseline.

The sample-test coverage motivation came out of the discussion on #310, which notes
that no CI job currently runs the sample pytest suite. This PR does not fix #310.

@google-cla

google-cla Bot commented Aug 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@giorgioroth

Copy link
Copy Markdown

Nice work, @arjun2075, clean scope, clean sequencing, and good call documenting the expected red baseline instead of mixing fixes into the CI PR.
I especially like that the workflow is being added as an observation mechanism, not allowed to redefine behavior just because it exposes existing failures. That keeps infrastructure, contract, and repair as three separate concerns. 👏

@arjun2075

Copy link
Copy Markdown
Author

Thanks — really appreciate the review.

That separation was intentional: I wanted the CI change to make the existing contract visible without bundling in behavioral fixes just to get a green baseline.

Once #310 and #313 land, I’ll rebase onto main, rerun both Python suites, and update the draft with the resulting green baseline before marking it ready for review.

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.

2 participants