Skip to content

ci: add Rust quality checks - #55

Closed
lucacillario wants to merge 1 commit into
replicatorfrom
ci-rust-checks
Closed

ci: add Rust quality checks#55
lucacillario wants to merge 1 commit into
replicatorfrom
ci-rust-checks

Conversation

@lucacillario

@lucacillario lucacillario commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changed

Add independent pull-request workflows for formatting, Clippy, and nextest. Configure Rust and Solana toolchains plus cached Cargo and Solana build artifacts.

Closes #39

Impact

Pull requests containing these workflows report all three standard Rust checks independently. The change affects CI only.

Validation

  • Parsed all three workflow files as YAML.
  • cargo fmt --check passed on the complete replicator stack.
  • git diff --check passed.
  • Clippy reached the existing Keeper SBF build locally; the installed Solana 3.0.11 platform toolchain is too old for edition 2024. CI installs Solana 4.0.3.
  • Nextest is installed and exercised by the CI workflow.

Reviewer notes

This branch is stacked on replicator, the first point where the complete engine workspace exists. Existing stack branches remain unchanged.

Swatinem/rust-cache@v2 was chosen instead of sccache because it integrates directly with GitHub Actions’ persistent cache and efficiently restores Cargo dependencies and build artifacts across ephemeral runners while keeping the CI setup simpler.

## What changed

Add independent pull-request workflows for formatting, Clippy, and nextest. Configure Rust and Solana toolchains plus cached Cargo and Solana build artifacts.

Closes #39

## Impact

Pull requests containing these workflows report all three standard Rust checks independently. The change affects CI only.

## Validation

- Parsed all three workflow files as YAML.
- `cargo fmt --check` passed on the complete `replicator` stack.
- `git diff --check` passed.
- Clippy reached the existing Keeper SBF build locally; the installed Solana 3.0.11 platform toolchain is too old for edition 2024. CI installs Solana 4.0.3.
- Nextest is installed and exercised by the CI workflow.

## Reviewer notes

This branch is stacked on `replicator`, the first point where the complete engine workspace exists. Existing stack branches remain unchanged.
An error occurred while trying to automatically change base from replicator to engine August 12, 2026 14:16
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added GitHub Actions workflows for Rust formatting, Clippy, and test checks. The workflows run on pushes and pull requests, use read-only permissions, cancel superseded runs, cache build tools, and use Rust 1.96.1.

Changes

Rust CI checks

Layer / File(s) Summary
CI triggers and concurrency
.github/workflows/ci-*.yml
The workflows run for configured pushes and pull request events. Each workflow uses read-only contents access and cancels superseded runs.
Formatting validation
.github/workflows/ci-fmt.yml
The formatting job installs Rust 1.96.1 with rustfmt and runs cargo fmt --check.
Clippy validation
.github/workflows/ci-lint.yml
The lint job caches Rust and Solana artifacts, installs required tooling, and runs Clippy with all features, targets, and warnings denied.
Test execution
.github/workflows/ci-test.yml
The test job caches Rust and Solana artifacts, installs cargo-nextest, and runs cargo nextest run --nff.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: bmuddha

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the addition of Rust quality checks, which matches the primary change.
Description check ✅ Passed The description accurately explains the three CI workflows, toolchain configuration, caching, impact, and validation.
Linked Issues check ✅ Passed The workflows implement formatting, Clippy, and nextest checks as independent pull-request CI workflows required by issue #39.
Out of Scope Changes check ✅ Passed The changes are limited to CI workflows and directly support the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-rust-checks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci-lint.yml:
- Around line 21-22: Set persist-credentials to false on the actions/checkout@v5
steps in .github/workflows/ci-lint.yml lines 21-22 and
.github/workflows/ci-test.yml lines 21-22; both checkout sites require the same
change.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7fac5464-f35e-4b2b-a45b-1e4dffc1ddac

📥 Commits

Reviewing files that changed from the base of the PR and between d8fd7f9 and 6db70c6.

📒 Files selected for processing (3)
  • .github/workflows/ci-fmt.yml
  • .github/workflows/ci-lint.yml
  • .github/workflows/ci-test.yml

Comment thread .github/workflows/ci-lint.yml

@bmuddha bmuddha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bmuddha
bmuddha deleted the branch replicator August 12, 2026 14:49
@bmuddha bmuddha closed this Aug 12, 2026
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.

2 participants