Skip to content

Gate run-tests workflow on code changes — Closes #160#162

Merged
conradbzura merged 1 commit intowool-labs:mainfrom
conradbzura:160-gate-tests-on-code-changes
Apr 6, 2026
Merged

Gate run-tests workflow on code changes — Closes #160#162
conradbzura merged 1 commit intowool-labs:mainfrom
conradbzura:160-gate-tests-on-code-changes

Conversation

@conradbzura
Copy link
Copy Markdown
Contributor

@conradbzura conradbzura commented Apr 6, 2026

Summary

Add a detect-changes gate job to the run-tests workflow that reuses the existing get-touched-files composite 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 explicit actions/checkout@v4 step before invoking the local composite action so the repository contents are available at runtime.

Closes #160

Proposed changes

detect-changes job

Add a leading job that checks out the repository and invokes get-touched-files with pathspec wool/src/ wool/tests/ wool/pyproject.toml proto/ .github/. Expose a has_code_changes boolean output derived from the composite action's touched output. The explicit actions/checkout@v4 step is required because the get-touched-files composite action is a local action that must be resolved from the repository's working tree.

Conditional gates on existing jobs

Add needs: detect-changes and if: needs.detect-changes.outputs.has_code_changes == 'true' to the lint, unit-tests, and integration-tests jobs. The integration-tests job retains its existing unit-tests dependency alongside the new detect-changes dependency 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.

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.
@conradbzura conradbzura force-pushed the 160-gate-tests-on-code-changes branch from 29f7050 to 8043eee Compare April 6, 2026 21:29
@conradbzura conradbzura marked this pull request as ready for review April 6, 2026 21:41
@conradbzura conradbzura merged commit 3979de5 into wool-labs:main Apr 6, 2026
16 checks passed
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.

Gate run-tests workflow on code changes

1 participant