Skip to content

feat: Add comprehensive test suite with CI/CD pipeline#2

Open
chicodias wants to merge 9 commits intomainfrom
test/vitest-anchor-setup
Open

feat: Add comprehensive test suite with CI/CD pipeline#2
chicodias wants to merge 9 commits intomainfrom
test/vitest-anchor-setup

Conversation

@chicodias
Copy link

@chicodias chicodias commented Feb 2, 2026

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:

  • ✅ 58 Vitest tests for frontend components and API routes
  • ✅ 28 Anchor tests for stealth registry program
  • Fixed test signatures to match updated program interface
  • Added pubkey truncation helper for API route tests

CI/CD Pipeline:

  • Created GitHub Actions workflow
  • Frontend Tests (Vitest) - enabled
  • Anchor Program Tests - temporarily disabled (Solana toolchain CI issues)
  • Configured Corepack for yarn support

Production Safety:

  • Production program ID (DbGF7nB2kuMpRxwm4b6n11XcWzwvysDGQGztJ4Wvvu13) maintained in all source files
  • Created test-ci.sh script that temporarily syncs keys for CI testing, then reverts to production ID
  • Configured localnet for unlimited test faucet access
  • No interference with Vercel production deployment

Test Results

Local Vitest:

  • All 58 tests passing

Local Anchor:

  • All 28 tests passing on localnet

CI Status:

  • Vitest tests running in CI
  • Anchor tests disabled until Solana toolchain issues resolved

Test Plan

  • Run yarn test - all Vitest tests pass
  • Run anchor test in programs/stealth-registry - all tests pass locally
  • Verify production program ID unchanged in lib.rs
  • Verify CI passes on GitHub (Vitest only for now)

🤖 Generated with Claude Code

chicodias and others added 6 commits February 1, 2026 22:06
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>
@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solana-stealth Ready Ready Preview, Comment Feb 4, 2026 8:49pm

- 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>
chicodias and others added 2 commits February 4, 2026 17:46
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>
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.

1 participant