ci: Add status badge and prevent merging if no tests ran#1192
ci: Add status badge and prevent merging if no tests ran#1192chtruong814 merged 5 commits intomainfrom
Conversation
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
📝 WalkthroughWalkthroughTightened CI gating conditions in Changes
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
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.
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 |
There was a problem hiding this comment.
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
📒 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=scheduleas 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>
…#1192) Signed-off-by: Charlie Truong <chtruong@nvidia.com>
…#1192) Signed-off-by: Charlie Truong <chtruong@nvidia.com> Signed-off-by: yuanhangs <yuanhangs@nvidia.com>
What does this PR do ?
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information
Summary by CodeRabbit
Documentation
Chores