Skip to content

ci: add Python server integration-test and happy-path workflow#120

Merged
damaz91 merged 5 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:ci/python-server-tests
Jul 16, 2026
Merged

ci: add Python server integration-test and happy-path workflow#120
damaz91 merged 5 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:ci/python-server-tests

Conversation

@vishkaty

@vishkaty vishkaty commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #118. CI today is lint-only: nothing installs the Python server's dependencies, boots it, or runs the integration tests that already exist at rest/python/server/integration_test.py — so incompatibilities like #118 (the server on main cannot import against python-sdk@main since python-sdk#48) stay invisible until a newcomer follows the README and hits the ImportError.

This adds a workflow that exercises the documented paths end-to-end on every PR/push:

  1. uv sync for rest/python/server (with the python-sdk sibling checkout the editable path dependency expects, pinned to the last compatible commit f54858e; the pin comment documents why and how to bump);
  2. runs the existing integration tests via pytest (5 tests, currently green);
  3. seeds the database from rest/python/test_data/flower_shop per the server README;
  4. boots the server and polls /.well-known/ucp for readiness;
  5. runs the documented happy-path client against it and asserts its explicit success marker ("Happy Path completed successfully.") — marker-based because the client logs failures without a non-zero exit status.

Had this workflow existed, it would have turned red the day python-sdk#48 merged — exactly the early signal #118 asks for.

Verification: full local dry-run of every step, plus the identical workflow running green in my fork: https://github.com/vishkaty/samples/actions/runs/28898090014

Scope notes

@damaz91

damaz91 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Hello @vishkaty, we are switching to use to ucp-sdk from Pip rather than cloning the python-sdk repo in #131 - this PR would need to be changed once that merges.

I hope this makes sense to you.

katyalai and others added 3 commits July 15, 2026 12:24
Path-filter push/pull_request triggers to rest/python/** and the
workflow file itself, matching the path-filtered shape of the Node.js
workflow proposed in Universal-Commerce-Protocol#126, so unrelated changes do not spend CI minutes
booting the Python server.
Follows samples#131: the server's pyproject now resolves ucp-sdk from pip, so
the workflow no longer checks out the python-sdk repo (and no longer needs the
nested checkout path that made the editable ../python-sdk reference work).
CI exercises the same released SDK a user installs; catching SDK-main drift
is python-sdk CI's job, not this workflow's.
@vishkaty
vishkaty force-pushed the ci/python-server-tests branch from c78f1ab to 73f29fc Compare July 15, 2026 16:44
@vishkaty

Copy link
Copy Markdown
Contributor Author

Reworked per #131 — the workflow now installs ucp-sdk from pip: dropped the python-sdk checkout step and the nested checkout path it required. Verified every step locally end-to-end on ucp-sdk 0.4.3 (server pytest suite + DB init + server boot + happy-path client all green). Thanks for the heads-up @damaz91.

…client

This allows the CI workflow to rely on the exit status of the client
instead of grepping the logs for success.

Simplified the workflow step accordingly.
@damaz91
damaz91 merged commit 3f9470e into Universal-Commerce-Protocol:main Jul 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants