Skip to content

ci: skip tests for doc-comment-only PRs#629

Merged
QuantumExplorer merged 1 commit into
developfrom
ci/skip-tests-for-doc-only
Mar 9, 2026
Merged

ci: skip tests for doc-comment-only PRs#629
QuantumExplorer merged 1 commit into
developfrom
ci/skip-tests-for-doc-only

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

Summary

  • Automatically detect when a PR only changes doc comments (///, //!) in .rs files
  • Skip the test suite and coverage upload for such PRs
  • Linting and formatting still run (clippy checks doc formatting, rustfmt checks indentation)

How it works

The detect-changes job now has a needs-tests output in addition to any-code:

  1. If build files (.toml, .lock) changed → tests always needed
  2. If only .rs files changed on a PR → diff against the base branch, extract all added/removed lines, check if every non-blank line starts with /// or //!
  3. If all changes are doc-only → needs-tests=false, test jobs are skipped
  4. Push events to master/develop always run the full suite (the doc-check only runs for pull_request events)

Test plan

🤖 Generated with Claude Code

When a PR only modifies doc comments (/// and //!) in .rs files without
touching build files or actual code, skip the test suite and coverage.
Linting and formatting still run.

The detection works by diffing .rs files against the PR base, extracting
all added/removed lines, and checking if every non-blank line starts
with /// or //!. Build file changes (Cargo.toml, Cargo.lock) and push
events always run the full suite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer merged commit 49d95fd into develop Mar 9, 2026
5 checks passed
@QuantumExplorer QuantumExplorer deleted the ci/skip-tests-for-doc-only branch March 9, 2026 11:01
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 9, 2026

Warning

Rate limit exceeded

@QuantumExplorer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 51 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3648b6d-0cc5-4209-ad94-6ac01fdf8b08

📥 Commits

Reviewing files that changed from the base of the PR and between 2d60ccf and 4af35a4.

📒 Files selected for processing (1)
  • .github/workflows/grovedb.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/skip-tests-for-doc-only

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 and usage tips.

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