Gate run-tests workflow on code changes — Closes #160#162
Merged
conradbzura merged 1 commit intowool-labs:mainfrom Apr 6, 2026
Merged
Gate run-tests workflow on code changes — Closes #160#162conradbzura merged 1 commit intowool-labs:mainfrom
conradbzura merged 1 commit intowool-labs:mainfrom
Conversation
Add a detect-changes job that checks out the repo and invokes the existing get-touched-files composite action to determine whether source code, tests, build config, protos, or CI files were modified. The lint, unit-tests, and integration-tests jobs now depend on this gate and only run when has_code_changes is true, avoiding wasted CI minutes on documentation-only or skill-definition-only PRs.
29f7050 to
8043eee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add a
detect-changesgate job to therun-testsworkflow that reuses the existingget-touched-filescomposite action. When a PR only touches documentation, skill definitions, or other non-code files, the lint, unit-test, and integration-test matrices are skipped entirely — saving CI minutes without affecting branch protection (skipped jobs count as passing). Include an explicitactions/checkout@v4step before invoking the local composite action so the repository contents are available at runtime.Closes #160
Proposed changes
detect-changesjobAdd a leading job that checks out the repository and invokes
get-touched-fileswith pathspecwool/src/ wool/tests/ wool/pyproject.toml proto/ .github/. Expose ahas_code_changesboolean output derived from the composite action'stouchedoutput. The explicitactions/checkout@v4step is required because theget-touched-filescomposite action is a local action that must be resolved from the repository's working tree.Conditional gates on existing jobs
Add
needs: detect-changesandif: needs.detect-changes.outputs.has_code_changes == 'true'to thelint,unit-tests, andintegration-testsjobs. Theintegration-testsjob retains its existingunit-testsdependency alongside the newdetect-changesdependency to preserve sequential ordering when tests do run.Test cases
No test cases — this PR modifies only CI workflow configuration (YAML), not application or library code.