Skip to content

Comments

ci: add path-based filtering to skip irrelevant workflows on PRs#1542

Closed
KRRT7 wants to merge 3 commits intomainfrom
ci-path-based-filtering
Closed

ci: add path-based filtering to skip irrelevant workflows on PRs#1542
KRRT7 wants to merge 3 commits intomainfrom
ci-path-based-filtering

Conversation

@KRRT7
Copy link
Collaborator

@KRRT7 KRRT7 commented Feb 19, 2026

Summary

  • JS E2E workflows only trigger when JS-relevant files change (codeflash/languages/javascript/, packages/, code_to_optimize/js/, JS test files)
  • Python E2E workflows skip when only JS/npm files change (via ! negation patterns)
  • Python unit test and linter workflows (unit-tests, windows-unit-tests, mypy, prek) get path filters scoped to Python-relevant files
  • Unit test workflows intentionally keep code_to_optimize/js/** included since test_multi_file_code_replacer.py depends on JS fixtures
  • push: branches: [main] and workflow_dispatch remain unfiltered

Test plan

  • Open a PR touching only Python files → JS E2E workflows should not trigger
  • Open a PR touching only packages/ → Python E2E/unit tests should not trigger
  • Pushes to main still trigger everything (no path filter on push)
  • workflow_dispatch still works for all workflows

JS E2E workflows only trigger on JS-related file changes, Python E2E
and unit test workflows skip when only JS/npm files change. Push to
main and workflow_dispatch remain unfiltered.
test_multi_file_code_replacer.py depends on code_to_optimize/js/
fixtures, so unit tests need to trigger on JS fixture changes.
@github-actions github-actions bot added the workflow-modified This PR modifies GitHub Actions workflows label Feb 19, 2026
@claude
Copy link
Contributor

claude bot commented Feb 19, 2026

PR Review Summary

Prek Checks

Passed — No Python files changed in this PR; prek and mypy have nothing to check.

Code Review

No critical issues found.

This PR adds path-based filtering to 16 GitHub Actions workflow files. The changes are well-structured:

  • Python E2E workflows (8 files): Trigger on codeflash/, code_to_optimize/ (excluding JS), tests/, pyproject.toml, uv.lock, and related workflow files
  • JS E2E workflows (3 files): Trigger only on codeflash/languages/javascript/, packages/, code_to_optimize/js/, JS test files, and JS workflow files
  • Quality workflows (mypy, prek): Scoped to Python-relevant files with self-referencing workflow paths
  • Unit test workflows (2 files): Intentionally include code_to_optimize/js/ since test_multi_file_code_replacer.py depends on JS fixtures
  • Push to main and workflow_dispatch remain unfiltered — correct behavior
  • Each workflow file includes its own path for self-triggering (added in the third commit)

Test Coverage

⏭️ Skipped — No Python source files changed in this PR. All changes are to .github/workflows/*.yaml files, so coverage analysis is not applicable.


Last updated: 2026-02-19

Without these, workflow-only PRs never trigger the required checks,
leaving them stuck at "Waiting for status to be reported".
@KRRT7
Copy link
Collaborator Author

KRRT7 commented Feb 19, 2026

actually I'll think of a better way to do this

@KRRT7 KRRT7 closed this Feb 19, 2026
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