Add CI: Anchor build + TypeScript type check - #12
Merged
Conversation
Two parallel jobs: - rust-build: Installs Solana CLI + Anchor, runs `anchor build` - typescript-check: `npm ci` + `npx tsc --noEmit` Cargo and npm caches enabled. First run ~15 min (Anchor install), subsequent runs ~3 min (cached). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Upgrade TypeScript 4.x → 6.x (Solana SDK .d.ts requires TS 5+ syntax) - Convert test files from require() to ES imports (fixes value-as-type errors) - Add moduleDetection: force + skipLibCheck to tsconfig - Update lib target es2017 → es2022 for Symbol.dispose support - Fix Keypair type annotations (instance vs typeof) - Fix migrations/deploy.ts implicit any npx tsc --noEmit now passes cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Anchor CLI 0.30.1 fails to compile from source on latest Rust stable (time crate 0.3.29 type inference issue). cargo build-sbf comes with the Solana CLI and compiles the program directly without needing Anchor CLI installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cargo build-sbf requires Solana CLI's bundled Rust which can't parse Cargo.lock v4. cargo check with system Rust proves compilation without needing the BPF target. Warnings are expected (Anchor derive macros). 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
.github/workflows/ci.yml)anchor buildnpm ci+npx tsc --noEmitNotes
anchor test(requires local validator, separate concern)Test plan
.github/workflows/ci.ymlGenerated with Claude Code