-
Notifications
You must be signed in to change notification settings - Fork 3.9k
ci: Skip jetbrains, gui, and binary checks when only docs are modified #8768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add changes detection job using dorny/paths-filter - Skip jetbrains-tests, gui-checks, and binary-checks when only /docs files change - Saves CI resources for documentation-only PRs Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
|
|
✅ Review Complete Code Review Summary |
The alls-green action needs to be configured to allow certain jobs to be skipped when only docs are changed. This prevents the workflow from failing when gui-checks, binary-checks, and jetbrains-tests are intentionally skipped.
…nged Added the same docs-only detection logic to cli-pr-checks workflow to skip the test job matrix that runs on ubuntu-latest, windows-latest, and macos-latest with multiple Node versions. This will significantly reduce CI time for docs-only PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 2 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name=".github/workflows/cli-pr-checks.yml">
<violation number="1" location=".github/workflows/cli-pr-checks.yml:27">
The `non-docs` filter never matches anything because it only contains a negative glob, so any PR that touches docs—even alongside code changes—will be misclassified as docs-only and will incorrectly skip the downstream checks.</violation>
</file>
<file name=".github/workflows/pr-checks.yaml">
<violation number="1" location=".github/workflows/pr-checks.yaml:28">
`non-docs` never matches anything because it only lists a negated glob, so any PR that touches docs will be treated as “docs-only” and the GUI/Binary/JetBrains checks will be skipped even when code files change.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| docs: | ||
| - 'docs/**' | ||
| non-docs: | ||
| - '!docs/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The non-docs filter never matches anything because it only contains a negative glob, so any PR that touches docs—even alongside code changes—will be misclassified as docs-only and will incorrectly skip the downstream checks.
Prompt for AI agents
Address the following comment on .github/workflows/cli-pr-checks.yml at line 27:
<comment>The `non-docs` filter never matches anything because it only contains a negative glob, so any PR that touches docs—even alongside code changes—will be misclassified as docs-only and will incorrectly skip the downstream checks.</comment>
<file context>
@@ -10,6 +10,30 @@ permissions:
+ docs:
+ - 'docs/**'
+ non-docs:
+ - '!docs/**'
+ - name: Check if only docs changed
+ id: check-changes
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdougie this seems valid
| docs: | ||
| - 'docs/**' | ||
| non-docs: | ||
| - '!docs/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-docs never matches anything because it only lists a negated glob, so any PR that touches docs will be treated as “docs-only” and the GUI/Binary/JetBrains checks will be skipped even when code files change.
Prompt for AI agents
Address the following comment on .github/workflows/pr-checks.yaml at line 28:
<comment>`non-docs` never matches anything because it only lists a negated glob, so any PR that touches docs will be treated as “docs-only” and the GUI/Binary/JetBrains checks will be skipped even when code files change.</comment>
<file context>
@@ -11,6 +11,30 @@ on:
+ docs:
+ - 'docs/**'
+ non-docs:
+ - '!docs/**'
+ - name: Check if only docs changed
+ id: check-changes
</file context>
RomneyDa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
| docs: | ||
| - 'docs/**' | ||
| non-docs: | ||
| - '!docs/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdougie this seems valid
|
Duplicate of #8576 |
|
merged that one ^ |
Description
This PR optimizes our CI workflow by skipping certain test jobs when only documentation files are changed. This will save CI resources and reduce build times for documentation-only PRs.
Changes
changesdetection job that usesdorny/paths-filterto determine what files were modifiedjetbrains-tests,gui-checks, andbinary-checksjobs to skip execution when only files in/docsare changedImplementation Details
The solution uses:
if: needs.changes.outputs.docs-only != 'true'Testing
/docs: The three mentioned jobs will be skippedrequire-all-checks-to-passjob still maintains all dependenciesBenefits
Generated with Continue
Co-Authored-By: Continue noreply@continue.dev
Summary by cubic
Skips JetBrains, GUI, binary, and CLI test matrix jobs when a PR only changes files in /docs to reduce CI time and save resources. All checks still run when any non-doc files change.
Written for commit 3a7e598. Summary will update automatically on new commits.