Skip to content

ci: scope workflow triggers to skip docs-only changes#2042

Merged
KRRT7 merged 3 commits into
mainfrom
ci/scope-workflow-triggers
Apr 9, 2026
Merged

ci: scope workflow triggers to skip docs-only changes#2042
KRRT7 merged 3 commits into
mainfrom
ci/scope-workflow-triggers

Conversation

@KRRT7
Copy link
Copy Markdown
Contributor

@KRRT7 KRRT7 commented Apr 9, 2026

Summary

  • codeflash-optimize.yaml: Replace paths: ['**'] wildcard with targeted filters (same bug fixed in ci: replace wildcard path triggers on E2E tests #2025, missed this workflow)
  • mypy.yml: Add path filters — was running on every PR/push including docs-only changes
  • prek.yaml: Add path filters — was running on every PR
  • unit-tests.yaml: Add path filters — was running on every PR/push (7-job matrix × every docs PR = waste)

All four now only trigger when source code, tests, dependencies, or their own workflow file changes.

Test plan

  • Verify these workflows do NOT run on a docs/README-only PR
  • Verify these workflows DO run on a PR touching codeflash/**

- codeflash-optimize.yaml: replace paths: ['**'] wildcard with targeted filters
- mypy.yml: add path filters (was firing on every PR/push including docs)
- prek.yaml: add path filters (was firing on every PR)
- unit-tests.yaml: add path filters (was firing on every PR/push)

Docs-only, README, experiment, and LICENSE changes no longer trigger
these workflows. Saves ~20 workflow runs per docs-only PR.
@github-actions github-actions Bot added the workflow-modified This PR modifies GitHub Actions workflows label Apr 9, 2026
KRRT7 added 2 commits April 9, 2026 05:04
Editing the workflow config shouldn't trigger a full optimization run.
Editing a workflow YAML file should not trigger that same workflow
to run. Removes .github/workflows/<file> from its own paths filter
in mypy.yml, prek.yaml, and unit-tests.yaml.
@KRRT7 KRRT7 merged commit 116a674 into main Apr 9, 2026
3 of 4 checks passed
@KRRT7 KRRT7 deleted the ci/scope-workflow-triggers branch April 9, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow-modified This PR modifies GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant