Skip to content

fix(ci): move snapshot tests to using cargo test#6540

Merged
hanabi1224 merged 9 commits intomainfrom
hm/ci-nextest-stats
Feb 5, 2026
Merged

fix(ci): move snapshot tests to using cargo test#6540
hanabi1224 merged 9 commits intomainfrom
hm/ci-nextest-stats

Conversation

@hanabi1224
Copy link
Copy Markdown
Contributor

@hanabi1224 hanabi1224 commented Feb 5, 2026

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Chores
    • Restructured testing infrastructure with new feature flags to improve test organization and execution
    • Refactored test task configuration to separate test runners and enhance testing efficiency
    • Updated code coverage configuration to align with new testing structure

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

Walkthrough

The changes introduce new Cargo feature declarations (test, cargo-test, doctest-private, benchmark-private, interop-tests-private) and apply conditional compilation guards to test code using the cargo-test feature. Test functions are renamed with a cargo_test_ prefix, and build tasks are reorganized in mise.toml to split test execution between nextest and cargo test runners.

Changes

Cohort / File(s) Summary
Feature Declarations
AGENTS.md, Cargo.toml
Adds five new feature declarations: test, cargo-test, doctest-private, benchmark-private, and interop-tests-private with inline documentation explaining their purpose.
Build System
build.rs
Adds #[cfg(feature = "cargo-test")] conditional compilation guard to the generated test function and renames generated test function from rpc_snapshot_test_{ident} to cargo_test_rpc_snapshot_test_{ident}.
Task Configuration
mise.toml
Renames test:rust task to test:nextest with feature flags, introduces new test:cargo task for cargo test execution, updates top-level test task to invoke both variants, and enables feature flags in codecov task.
Test Code with Feature Gates
src/state_manager/utils.rs, src/tool/subcommands/api_cmd/test_snapshot.rs
Wraps test functions and imports with #[cfg(feature = "cargo-test")], renames test functions with cargo_test_ prefix (e.g., state_compute_mainnet_5709604cargo_test_state_compute_mainnet_5709604), and adds #[allow(dead_code)] attribute to suppress warnings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • akaladarshi
  • LesnyRumcajs
  • sudo-shashank
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(ci): move snapshot tests to using cargo test' directly and clearly describes the main change: migrating snapshot tests to use cargo test instead of another mechanism.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hm/ci-nextest-stats

Comment @coderabbitai help to get the list of available commands and usage tips.

@hanabi1224 hanabi1224 marked this pull request as ready for review February 5, 2026 11:38
@hanabi1224 hanabi1224 requested a review from a team as a code owner February 5, 2026 11:38
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and sudo-shashank and removed request for a team February 5, 2026 11:38
@hanabi1224 hanabi1224 changed the title get cargo nextest CI job stats fix(ci): move snapshot tests to using cargo test Feb 5, 2026
Comment thread src/state_manager/utils.rs
@hanabi1224 hanabi1224 enabled auto-merge February 5, 2026 12:22
@hanabi1224 hanabi1224 added this pull request to the merge queue Feb 5, 2026
@hanabi1224 hanabi1224 linked an issue Feb 5, 2026 that may be closed by this pull request
Merged via the queue into main with commit 815a03f Feb 5, 2026
44 checks passed
@hanabi1224 hanabi1224 deleted the hm/ci-nextest-stats branch February 5, 2026 13:06
@coderabbitai coderabbitai Bot mentioned this pull request Mar 3, 2026
6 tasks
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.

Resource exhaustion during test compilation

2 participants