Skip to content

Conversation

@blackgirlbytes
Copy link
Contributor

@blackgirlbytes blackgirlbytes commented Aug 13, 2025

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 changes job intended to detect and skip these scenarios.

Root Cause

The code filter uses '**' as an inclusion pattern, which causes it to evaluate to true whenever any files are changed, regardless of the exclusion patterns that follow:

code:
  - '**'                    # Matches all files (always true if any files changed)
  - '!documentation/**'     # Exclusions don't prevent the filter from being true
  - '!**/*.md'

Solution

Remove the '**' pattern and use only exclusion patterns for the code filter. Also expand markdown detection to include subdirectories:

docs-only:
  - 'documentation/**'
  - '**/*.md'              # Matches .md files anywhere in repo
code:
  - '!documentation/**'    # Only true if non-documentation files are changed
  - '!**/*.md'

Result

  • Documentation-only PRs will have code = false, properly skipping expensive CI jobs
  • Markdown files anywhere in the repo (README files, etc.) are treated as documentation
  • Code changes still trigger full CI as expected

Testing

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
Screenshot 2025-08-13 at 10 16 06 AM

Code change

Included the other build test
Screenshot 2025-08-13 at 10 17 00 AM

…nges

The current CI workflow runs all tests even for documentation-only PRs,
despite having a changes job intended to detect and skip these scenarios.

The code filter uses '**' as an inclusion pattern, which causes it to
evaluate to true whenever any files are changed, regardless of the
exclusion patterns that follow.

This change removes the '**' pattern and uses only exclusion patterns
for the code filter, and expands markdown detection to include
subdirectories with '**/*.md' instead of just '*.md'.

Result: Documentation-only PRs will have code = false, properly
skipping expensive CI jobs while still triggering full CI for
actual code changes.
@blackgirlbytes blackgirlbytes merged commit 8217ab1 into main Aug 13, 2025
11 checks passed
@blackgirlbytes blackgirlbytes deleted the fix-ci-docs-only-filter branch August 13, 2025 14:52
katzdave added a commit that referenced this pull request Aug 13, 2025
* 'main' of github.com:block/goose:
  fix(build): feed electronforge the icon explicitly for linux (#4045)
  Docs: Troubleshooting tip - Nodejs path on windows (#4065)
  fix: flag out uncompilable bit in windows (#4068)
  ci: fix docs-only filter to properly skip tests for documentation changes (#4066)
  fix: ctrl-C interruption in the CLI (#4057)
zanesq added a commit that referenced this pull request Aug 13, 2025
* 'main' of github.com:block/goose: (120 commits)
  Docs: Troubleshooting tip - Nodejs path on windows (#4065)
  fix: flag out uncompilable bit in windows (#4068)
  ci: fix docs-only filter to properly skip tests for documentation changes (#4066)
  fix: ctrl-C interruption in the CLI (#4057)
  docs: mcp-ui support (#4049)
  fix: delete dialog layout (#4037)
  ci: fix markdown file pattern to skip builds for all .md files (#4061)
  docs: add window title (#4059)
  blog: cleaning up some posts (#4050)
  fix: this should be a debug message not a warn (#4024)
  Better provider logging (#4052)
  feat: ToolError migration to ErrorData (#4051)
  docs: rename sessions (#4053)
  Add mcp automated testing blog (#4004)
  MCP session replay integration test (#3939)
  Docs: Cost tracking in CLI (#4043)
  sanitize message content on deserialization (#3966)
  Move summarize button inside of context view (#4015)
  blog: post on lead/worker model (#3994)
  Actually send cancellation to MCP servers (#3865)
  ...
jsibbison-square added a commit that referenced this pull request Aug 14, 2025
…ol-visibility

* origin/main: (43 commits)
  docs: Blog - How I Used Goose to Rebuild My Website (#4076)
  docs: custom context file names (#4077)
  Blog: How Pulse MCP Used Goose to Automate Their Newsletter (#4075)
  Load recipe deeplinks in single window when app is closed (#4048)
  docs: make accurate the comments with links to unsigned builds of the app (#4070)
  cleanup memory in chat (#4073)
  CLI: improve model selection ux (#4071)
  speed up loading extensions by loading in parallel (#4054)
  fix(build): feed electronforge the icon explicitly for linux (#4045)
  Docs: Troubleshooting tip - Nodejs path on windows (#4065)
  fix: flag out uncompilable bit in windows (#4068)
  ci: fix docs-only filter to properly skip tests for documentation changes (#4066)
  fix: ctrl-C interruption in the CLI (#4057)
  docs: mcp-ui support (#4049)
  fix: delete dialog layout (#4037)
  ci: fix markdown file pattern to skip builds for all .md files (#4061)
  docs: add window title (#4059)
  blog: cleaning up some posts (#4050)
  fix: this should be a debug message not a warn (#4024)
  Better provider logging (#4052)
  ...
ayax79 pushed a commit to ayax79/goose that referenced this pull request Aug 21, 2025
…nges (block#4066)

Signed-off-by: Jack Wright <jack.wright@nike.com>
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.

3 participants