feat: Add comprehensive test suite with CI/CD pipeline#2
Open
feat: Add comprehensive test suite with CI/CD pipeline#2
Conversation
Add testing infrastructure and comprehensive test coverage: - Configure Vitest with React Testing Library for frontend tests - Add comprehensive Anchor program tests for stealth-registry - Handle validation (edge cases, invalid chars, length limits) - PDA derivation and account structure - Authority updates and transfer workflows - Integration scenarios with multiple users - Add component tests for UI elements (button, input) - Add utility and API route tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add public key truncation to donate route for better UX - Configure Anchor.toml for localnet testing - Sync program IDs with keypair - Update test calls to include destination_pubkey parameter - All tests passing: 58 Vitest + 28 Anchor tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Keep production program ID (DbGF7nB2kuMpRxwm4b6n11XcWzwvysDGQGztJ4Wvvu13) in lib.rs - Configure Anchor.toml to use production ID for both devnet and localnet - Add CI test script (programs/stealth-registry/scripts/test-ci.sh) - Syncs keys for testing - Runs anchor test - Reverts to production ID after tests - Add GitHub Actions workflow (.github/workflows/test.yml) - Frontend tests with Vitest - Anchor program tests with proper keypair handling - Caching for faster CI runs - Production deployment unaffected by test configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ad8df60 to
84566bc
Compare
84566bc to
aaf5a5e
Compare
aaf5a5e to
1012212
Compare
1012212 to
ad7c603
Compare
ad7c603 to
2d132e5
Compare
2d132e5 to
07fda15
Compare
- Use solana-developers/github-actions/setup-all for Solana/Anchor setup - Adapt run-tests steps for monorepo structure (working-directory) - Downgrade to Anchor 0.30.1 / Solana 1.18.18 for Rust 1.75 compatibility - Add version fields to Anchor.toml for version extraction - Use Swatinem/rust-cache with workspaces option for monorepo Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
07fda15 to
b66e1d9
Compare
Solana toolchain setup has compatibility issues in CI. Running Vitest frontend tests only for now. Co-Authored-By: Claude Opus 4.5 <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
This PR adds a comprehensive testing infrastructure with both frontend (Vitest) and Anchor program tests, along with a GitHub Actions CI/CD pipeline.
Changes
Test Infrastructure:
CI/CD Pipeline:
Production Safety:
DbGF7nB2kuMpRxwm4b6n11XcWzwvysDGQGztJ4Wvvu13) maintained in all source filestest-ci.shscript that temporarily syncs keys for CI testing, then reverts to production IDTest Results
Local Vitest:
Local Anchor:
CI Status:
Test Plan
yarn test- all Vitest tests passanchor testin programs/stealth-registry - all tests pass locally🤖 Generated with Claude Code