Skip to content

Skip Solana keypair test when solders is absent; add CI#39

Open
Pattermesh wants to merge 1 commit into
mainfrom
pattermesh/monsoon-ci-test-skip
Open

Skip Solana keypair test when solders is absent; add CI#39
Pattermesh wants to merge 1 commit into
mainfrom
pattermesh/monsoon-ci-test-skip

Conversation

@Pattermesh

Copy link
Copy Markdown
Contributor

What

Two changes:

  1. Fix a brittle test. tests/test_solana_connector.py::TestSolanaWallet::test_generate_new_wallet hard-failed whenever the optional solders dependency was not installed. Without solders, SolanaWallet() falls back to a stub wallet with pubkey = "STUB_PUBKEY" (11 chars), but the test asserts len(wallet.pubkey) > 30 (a real base58 pubkey). The test now guards with pytest.importorskip("solders"), so it skips gracefully instead of failing when the dep is absent.

  2. Add CI. New .github/workflows/ci.yml runs python -m pytest -q on every push and PR to main, across Python 3.10 / 3.11 / 3.12. solders is intentionally not installed in CI, which exercises the new skip path.

Why

solders is an optional dependency (the Solana connector degrades to a stub without it). A missing optional dep should not turn the whole suite red. There was also no CI, so regressions could land silently.

Verification

With solders absent (the default environment), python3 -m pytest -q:

SKIPPED [1] tests/test_solana_connector.py:14: could not import 'solders': No module named 'solders'
99 passed, 1 skipped in ~1s

The previously-failing test now skips; the other 99 tests pass.

🤖 Generated with Claude Code

@abhicris

Copy link
Copy Markdown
Contributor

Welcome to kcolbchain, @Pattermesh — glad you're here. 🌱

Here's what happens from this PR:

  1. Our automated review looks for obvious issues (tests, secrets, size) within a couple of hours.
  2. If it's clean and CI passes, we merge without back-and-forth.
  3. If we need changes, we'll leave a specific comment — not a generic nit. Push another commit and we re-review.

While you wait:

  • Run the repo's tests locally (see the repo README.md).
  • Keep the PR scoped to one concern — bigger PRs land slower.
  • Don't commit tokens or .env contents.

What happens after your first merge

Thanks for writing the code. We're building this to last.

test_generate_new_wallet hard-failed when the optional `solders`
dependency was not installed: SolanaWallet falls back to a stub
pubkey ("STUB_PUBKEY", 11 chars) and the test asserts a base58
pubkey longer than 30 chars. Guard it with pytest.importorskip
so it skips gracefully instead of failing.

Also add .github/workflows/ci.yml running `pytest -q` on push and
PRs to main across Python 3.10-3.12. solders is intentionally not
installed in CI, exercising the skip path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Pattermesh Pattermesh force-pushed the pattermesh/monsoon-ci-test-skip branch from 338b82a to 1418609 Compare July 1, 2026 08:36
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.

2 participants