Skip to content

Conversation

@Harish-Naruto
Copy link
Member

@Harish-Naruto Harish-Naruto commented Dec 20, 2025

Summary by CodeRabbit

  • Chores
    • Updated CI workflow so the test suite runs only for pull requests targeting the main branch; pull requests to other branches automatically skip tests. This reduces CI usage and speeds up pipeline processing for non-main work.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Walkthrough

GitHub Actions workflow updated to run the test job only for pull requests targeting main (via a base_ref == 'main' condition). A separate skip-tests job was added to run when the PR target is not main. Inline comment after bun-version was removed.

Changes

Cohort / File(s) Summary
Workflow change
\.github/workflows/tests\.yml
Removed branch filtering from pull_request trigger; added if: github.event.pull_request.base_ref == 'main' to the main test job; added a skip-tests job that runs when the base ref is not main and emits a skip message; preserved bun-version value and removed its trailing inline comment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Attention required:
    • Verify the if: github.event.pull_request.base_ref == 'main' condition behaves as expected for all PR events.
    • Confirm the skip-tests job runs on non-main PRs and its message/outputs are intentional.
    • Ensure removal of the inline comment after bun-version didn't accidentally alter YAML structure or value.

Poem

🐰 I hopped through YAML bright and spry,
Tests leap only where main is nigh.
Other PRs take a gentler beat —
A tiny skip, a quiet greet. 🥕

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 accurately describes the main change: GitHub Actions workflow updated to skip tests for non-main branches while running tests for main-targeting PRs.
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 github-actions-update

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23ab454 and 60663ca.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml (3 hunks)
🔇 Additional comments (2)
.github/workflows/tests.yml (2)

38-44: LGTM! Previous issues resolved.

Excellent work fixing both previously identified issues:

  • ✅ Runner label corrected from ubuntu-lastest to ubuntu-latest
  • ✅ Step name updated from "Skip tests for non-main Prisma" to "Skip tests for non-main PR"

The skip-tests job provides clear visibility when tests are intentionally skipped for non-main PRs. The conditional logic is correct and mutually exclusive with the test job.


8-8: Verify branch protection compatibility with conditional job execution.

Good work fixing the previous issues! However, there's an important behavior to clarify: when a job's if condition evaluates to false, the job will report its status as "Success" rather than failing. This means it will not prevent a pull request from merging, even if it is a required check.

For non-main PRs, the test job will be skipped entirely but will still count as passing. If your branch protection rules mark this job as required, PRs can merge without actually running tests. Verify your branch protection rules don't require the test job, or consider restructuring to ensure tests always run (conditionally skipping steps instead of the entire job).


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.

Copy link
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: 2

🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)

38-44: Consider whether the skip-tests job is necessary.

The skip-tests job only outputs a message and doesn't perform any meaningful work. Unless you need this job for required status checks or reporting purposes, it may add unnecessary complexity to the workflow. Consider whether this job serves a specific requirement in your CI/CD process.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e5ebcb and 23ab454.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/tests.yml

40-40: label "ubuntu-lastest" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🔇 Additional comments (1)
.github/workflows/tests.yml (1)

8-8: LGTM! Conditional logic is correct.

The conditional correctly ensures tests run only for PRs targeting the main branch. The use of github.base_ref is appropriate for pull_request events.

@callofcode07 callofcode07 self-requested a review December 20, 2025 19:03
@callofcode07 callofcode07 merged commit 8284f94 into main Dec 20, 2025
3 checks passed
@callofcode07 callofcode07 deleted the github-actions-update branch December 20, 2025 19:03
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.

4 participants