Skip to content

chore: don't run coverage on dependabot commits#6348

Merged
LesnyRumcajs merged 1 commit intomainfrom
dependabot-no-coverage
Dec 15, 2025
Merged

chore: don't run coverage on dependabot commits#6348
LesnyRumcajs merged 1 commit intomainfrom
dependabot-no-coverage

Conversation

@LesnyRumcajs
Copy link
Copy Markdown
Member

@LesnyRumcajs LesnyRumcajs commented Dec 15, 2025

Summary of changes

Changes introduced in this pull request:

  • dep updates dont' change coverage (unless breaking and we have to fix them), so let's just save some worker cycles and not run it on its PRs.

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.

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to exclude automated dependency updates from coverage analysis.

✏️ Tip: You can customize this high-level summary in your review settings.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner December 15, 2025 16:11
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team December 15, 2025 16:11
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 15, 2025

Walkthrough

Modifies the Coverage job in the CI workflow to exclude Dependabot PRs from execution. The condition now checks both that the pull request is not a draft and that the actor is not dependabot[bot].

Changes

Cohort / File(s) Change Summary
CI Workflow Configuration
.github/workflows/coverage.yml
Added condition to exclude Dependabot PRs from the Coverage job by extending the run condition to check that the actor is not dependabot[bot]

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

github_actions, dependencies

Suggested reviewers

  • hanabi1224
  • akaladarshi

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: preventing coverage job execution on Dependabot PRs to optimize CI resource usage.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dependabot-no-coverage

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e3af9f and eaf9e32.

📒 Files selected for processing (1)
  • .github/workflows/coverage.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6074
File: src/rpc/methods/chain.rs:55-56
Timestamp: 2025-09-17T11:32:44.185Z
Learning: In the Forest codebase, hanabi1224 prefers that CodeRabbit should not warn about potential compilation issues (such as Send bounds, async/await compatibility, etc.) since they are already guarded by CI tests. Focus should be on higher-level design and logic issues instead.
Learnt from: LesnyRumcajs
Repo: ChainSafe/forest PR: 5907
File: src/rpc/methods/state.rs:523-570
Timestamp: 2025-08-06T15:44:33.467Z
Learning: LesnyRumcajs prefers to rely on BufWriter's Drop implementation for automatic flushing rather than explicit flush() calls in Forest codebase.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build Ubuntu
  • GitHub Check: All lint checks
  • GitHub Check: Build MacOS
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: Coverage

codecov:
name: Coverage
if: github.event.pull_request.draft == false
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Condition will break coverage for non-PR triggers (push, merge_group, workflow_dispatch).

The condition references github.event.pull_request.draft, which only exists for pull_request events. For push, merge_group, and workflow_dispatch events, this context is null, causing the expression to evaluate to false and skipping the job entirely.

This will break coverage reporting for pushes to main and merge groups.

Revise the condition to only apply the draft and dependabot checks when the event is actually a pull_request:

-    if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
+    if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && github.actor != 'dependabot[bot]')

This allows non-pull_request events to always run, while restricting pull_request events to non-draft, non-dependabot cases.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && github.actor != 'dependabot[bot]')
🤖 Prompt for AI Agents
.github/workflows/coverage.yml around line 38: the current if uses
github.event.pull_request.draft which is null for non-pull_request events and
causes the job to skip; change the conditional to only apply the draft and
dependabot checks when the event is a pull_request by making the job run if the
event is not a pull_request OR (it is a pull_request AND pull_request.draft is
false AND actor is not dependabot[bot]); update the if expression accordingly so
push/merge_group/workflow_dispatch always run while pull_request runs only for
non-draft, non-dependabot PRs.

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main with commit 3f0d1d2 Dec 15, 2025
44 checks passed
@LesnyRumcajs LesnyRumcajs deleted the dependabot-no-coverage branch December 15, 2025 17:12
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.

3 participants