Skip to content

ci: Add status badge and prevent merging if no tests ran#1192

Merged
chtruong814 merged 5 commits intomainfrom
chtruong/quality-check
Sep 25, 2025
Merged

ci: Add status badge and prevent merging if no tests ran#1192
chtruong814 merged 5 commits intomainfrom
chtruong/quality-check

Conversation

@chtruong814
Copy link
Contributor

@chtruong814 chtruong814 commented Sep 23, 2025

What does this PR do ?

  • Add status badge on README for nightly CI tests
  • Prevent merging if no tests are ran
Screenshot 2025-09-22 at 7 58 36 PM

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Summary by CodeRabbit

  • Documentation

    • Added CI/CD status badge to the README.
    • Added News items for v0.3.0, linking to the release tag, blog post, and Colab run metrics.
    • Minor formatting improvements around code examples.
  • Chores

    • Tightened CI gating to require successful documentation, container build, and test checks before passing, improving release reliability.

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@chtruong814 chtruong814 requested review from a team as code owners September 23, 2025 00:41
@github-actions github-actions bot added the CI Relating to CI label Sep 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 23, 2025

📝 Walkthrough

Walkthrough

Tightened CI gating conditions in .github/workflows/cicd-main.yml to require explicit success from several jobs and stricter test outcomes; updated README.md to add a CI/CD badge, news entries, and minor formatting tweaks.

Changes

Cohort / File(s) Summary of changes
CI Workflow gating
.github/workflows/cicd-main.yml
Revised CI_QA_Gate ALL_SUCCESS condition: require test_level != 'none'; mandate sphinx-build.result == 'success' and build-container.result == 'success'; require docs tests be success; unit/functional tests allow skipped or success.
Docs: README
README.md
Added CI/CD badge; added v0.3.0 release news and blog link; added metrics link; minor whitespace/formatting adjustments around code blocks.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Push/PR
    participant GH as GitHub Actions
    participant Pre as pre-flight
    participant Doc as sphinx-build
    participant Ctr as build-container
    participant TDoc as doc-tests
    participant TUnit as unit-tests
    participant TFunc as functional-tests
    participant Gate as CI_QA_Gate

    Dev->>GH: Trigger workflow
    GH->>Pre: Run pre-flight
    GH->>Doc: Build docs
    GH->>Ctr: Build container
    par Tests
        GH->>TDoc: Run doc tests
        GH->>TUnit: Run unit tests
        GH->>TFunc: Run functional tests
    end

    Note over Gate: ALL_SUCCESS condition (tightened)
    Gate->>Gate: Check test_level != 'none'
    Gate->>Gate: Check Doc.result == success
    Gate->>Gate: Check Ctr.result == success
    Gate->>Gate: Check TDoc.result == success
    Gate->>Gate: Check TUnit.result in {success, skipped}
    Gate->>Gate: Check TFunc.result in {success, skipped}
    Gate-->>GH: Pass/Fail gate based on conjunctive checks
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

CI, CI:docs

Suggested reviewers

  • ffrujeri
  • terrykong

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title "ci: Add status badge and prevent merging if no tests ran" accurately and concisely reflects the main changes in the PR by referencing the README badge addition and the CI gating change that blocks merges when tests did not run; it is a single clear sentence and directly related to the changeset. It lets a reviewer quickly understand the primary intent (README badge plus stricter merge gating) without listing files or noisy details. The phrasing is specific enough for history scanning and matches the PR description and file diffs.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Test Results For Major Changes ✅ Passed The PR modifies CI gating logic and updates the README with a status badge and news, without changing library/runtime code, public APIs, numerics, or performance-critical paths. These are process/infra and documentation updates, which are minor per the check’s criteria. While the PR description does not include test results, none are required for such minor changes. Therefore, the custom check passes.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chtruong/quality-check

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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: 0

🧹 Nitpick comments (1)
.github/workflows/cicd-main.yml (1)

307-313: Update the summary comment to reflect the new policy.

The comment still says “successful if nothing was run,” but gating now requires test_level != 'none'. Suggest updating for clarity.

Apply this diff:

-          # Job is considered successful if nothing was run, or if all jobs were successful (the tests run even if only docs were run b/c doctests are selected)
+          # Job is considered successful only when tests were scheduled (test_level != 'none') and all required jobs succeeded.
+          # Docs-only PRs must still pass doc tests; unit/functional may be skipped depending on test_level.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cde2acd and 15b2517.

📒 Files selected for processing (2)
  • .github/workflows/cicd-main.yml (1 hunks)
  • README.md (2 hunks)
⏰ 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). (3)
  • GitHub Check: Lint check
  • GitHub Check: Post submodule check comment / Comment on PR
  • GitHub Check: Post automodel integration comment / Comment on PR
🔇 Additional comments (5)
README.md (3)

3-4: Nightly CI badge LGTM.

Scoped to branch=main&event=schedule as intended for nightly visibility. No action needed.


6-12: News entries read well and link targets look consistent.

Ordering and nesting under v0.3.0 are clear.


468-472: Whitespace tweak improves code block rendering.

Nice polish.

.github/workflows/cicd-main.yml (2)

193-201: Docs build gate is appropriate.

Only runs when test_level != 'none', aligning with “no tests ⇒ no merge.”


313-321: Stricter merge gate correctly blocks when no tests run and requires doc tests to pass.

This matches the PR goal. Please confirm:

  • CI_QA_Gate is a required status check on the repo/branch protection, or this won’t actually block merges.
  • Doc tests don’t get auto‑skipped on forks/self‑hosted runner outages; otherwise forks could be permanently blocked.

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
This reverts commit d43d80d.

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@chtruong814 chtruong814 added CI:docs Run doctest and removed CI:docs Run doctest labels Sep 25, 2025
@chtruong814 chtruong814 enabled auto-merge (squash) September 25, 2025 22:32
@chtruong814 chtruong814 merged commit c01f9d7 into main Sep 25, 2025
38 of 39 checks passed
@chtruong814 chtruong814 deleted the chtruong/quality-check branch September 25, 2025 22:37
PrinsYin pushed a commit to PrinsYin/RL that referenced this pull request Nov 30, 2025
…#1192)

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
yuanhangsu1986 pushed a commit to yuanhangsu1986/RL-Nemontron-Edge-Omni that referenced this pull request Feb 21, 2026
…#1192)

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: yuanhangs <yuanhangs@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:docs Run doctest CI Relating to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants