ci: fix docs-only filter to properly skip tests for documentation changes #4066
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix CI workflow to properly skip tests for documentation-only changes
Problem
The current CI workflow runs all tests even for documentation-only PRs (like #4004), despite having a
changesjob intended to detect and skip these scenarios.Root Cause
The
codefilter uses'**'as an inclusion pattern, which causes it to evaluate totruewhenever any files are changed, regardless of the exclusion patterns that follow:Solution
Remove the
'**'pattern and use only exclusion patterns for thecodefilter. Also expand markdown detection to include subdirectories:Result
code = false, properly skipping expensive CI jobsTesting
This change would have prevented the unnecessary CI runs on PR #4004, which only modified files under
documentation/blog/.Tested on my forked PR
Docs change
Skipped the other unneeded build test

Code change
Included the other build test
