Conversation
- Add report module: collect transaction profiles from each Surfnet instance, consolidate across parallel tests, and generate a self-contained HTML report with transaction inspection - Report triggered via SURFPOOL_REPORT=1 env var or .report(true) builder - Auto-detect test function names from thread names - Rich HTML report: Surfpool-branded UI with inline transaction tables, per-instruction CU breakdown, parsed JSON + hex byte comparison with diff highlighting, account state diffs - Add SurfpoolReport::from_directory() / generate_html() / write_html() - Add uuid, chrono, serde dependencies to SDK
Native Node.js bindings using napi-rs, following the same pattern as litesvm's node-litesvm crate. Exposes: - Surfnet.start() / Surfnet.startWithConfig() — spin up embedded surfpool - surfnet.rpcUrl / wsUrl / payer / payerSecretKey — accessors - surfnet.fundSol() / fundToken() / setAccount() / getAta() — cheatcodes - Surfnet.newKeypair() — generate random keypair TypeScript wrapper in surfpool-sdk/index.ts provides clean DX. Build: npx napi build --platform surfpool-sdk
Two composite actions for use by any repo: .github/actions/report — Surfpool Test Report - Upload report HTML as artifact - Deploy to GitHub Pages under configurable path (per-PR by default) - Post sticky PR comment with direct link Inputs: report-dir, output-path, generate-command, pages-path .github/actions/coverage — Coverage Report - Accept cargo-llvm-cov JSON and/or vitest coverage-summary.json - Render unified table with color badges (green ≥90%, yellow ≥80%, red <80%) - Post as sticky PR comment Inputs: rust-coverage-json, ts-coverage-json, thresholds Usage: uses: solana-foundation/surfpool/.github/actions/report@feat/sdk uses: solana-foundation/surfpool/.github/actions/coverage@feat/sdk
One-liner for test files: surfpool_sdk::report::SurfpoolReport::generate(None, None); Uses default paths (target/surfpool-reports → target/surfpool-report.html) and handles missing data gracefully with eprintln.
Avoids needing a tsc build step — 'import { Surfnet } from surfpool-sdk'
now resolves directly to the napi-generated internal.js binding.
Merges the two separate actions into one that posts a single PR comment:
- Coverage table (Rust + TS) at the top
- Surfpool test report link below (separated by ----)
- GitHub Pages deploy for the HTML report
- Artifact upload
Usage:
uses: solana-foundation/surfpool/.github/actions/test-report@feat/sdk
with:
rust-coverage-json: rust-cov/coverage.json
ts-coverage-json: ts-cov/coverage-summary.json
report-path: surfpool-report.html
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.
No description provided.