SUR-1267: Add CI with example contract validation#2
Merged
Patrick Miller (MillerPatrick214) merged 2 commits intoMar 20, 2026
Conversation
- GitHub Actions workflow: runs unit tests + example contract tests on Python 3.8, 3.10, 3.12 for every PR and main push - Contract test mocks HTTP layer, validates all SDK request payloads against JSON schemas from /schemas, returns schema-valid mock responses - Scans for hardcoded sur_live_ keys in examples and client source - Vendored JSON schemas from surmado-api-public into /schemas - Fixed version assertions in test_client.py (0.3.0 → 0.3.1) - Fixed README: Signal/Scan examples use url=, brand methods use website= - Added CI badge to README SUR-1267 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pytest was missing from pip install. Python 3.8 is EOL and failing on ubuntu-latest — bumped minimum CI matrix to 3.9. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sur_live_keys in examples and client source — CI fails if found/schemasurl=, brand methods usewebsite=200 tests passing (192 unit + 8 contract).
Test plan