Skip to content

Chore: add path filters to testing.yaml for pull_request trigger#101

Open
askb wants to merge 1 commit into
mainfrom
fix/testing-path-filters
Open

Chore: add path filters to testing.yaml for pull_request trigger#101
askb wants to merge 1 commit into
mainfrom
fix/testing-path-filters

Conversation

@askb

@askb askb commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add path filters to testing.yaml so Dependabot PRs that only bump SHA pins in .github/workflows/ skip the full test suite.

Why This Is Needed

  • 75% of Dependabot PRs across the org only change workflow files (SHA pin bumps)
  • Each triggers the full integration test suite unnecessarily
  • Eliminates 65%+ of CI compute waste

Approach: Denylist (Org Convention)

Uses the same opt-out pattern already established across the org:

paths:
  - '**'
  - '!.github/**'
  - '!.*'
  - '!tox.ini'
  • Fails open (safe) rather than closed (dangerous)
  • Universal and templatable from actions-template
  • Matches build-test.yaml convention in github2gerrit-action, dependamerge, gerrit-clone-action, gha-workflow-linter, lftools-uv

Impact

Scenario Before After
Dependabot bumps harden-runner SHA Full test suite runs Skipped ✅
Developer changes source code Full test suite runs Full test suite runs ✅

Part of org-wide Dependabot CI optimization initiative.

@askb askb requested review from a team and Copilot June 3, 2026 23:47
@github-actions github-actions Bot added the chore Code chores (dependency updates, etc) label Jun 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds pull-request path filtering to the CI test workflow so that PRs limited to certain non-code files can avoid running the full “Test & Validate” job (aimed at reducing unnecessary CI runs for Dependabot workflow SHA pin bumps).

Changes:

  • Add pull_request.paths filters to .github/workflows/testing.yaml to skip running this workflow when changes are limited to excluded paths/patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/testing.yaml
Problem:
The testing.yaml workflow triggers on ALL pull_request events regardless
of which files changed. Across the lfreleng-actions org, 75% of
Dependabot PRs (74 of 98 at last audit) only bump SHA pins in
.github/workflows/ files — yet each one triggers the full integration
test suite unnecessarily.

This wastes 65%+ of CI compute on test runs that can never catch a
regression because no source code, dependencies, or tests changed.

Solution:
Add path filters using the same denylist (opt-out) convention already
used by build-test.yaml across the org (dependamerge, gerrit-clone-action,
gha-workflow-linter, lftools-uv, github2gerrit-action):
  paths:
    - '**'
    - '!.github/**'
    - '!.*'
    - '!tox.ini'

This approach:
- Matches the existing org convention
- Fails open (worst case: a few extra CI minutes) rather than failing
  closed (allowlist silently stops running tests if layout changes)
- Is universal and templatable from actions-template without per-repo
  customization across 55+ repos of varying languages

Impact:
- Before: Every Dependabot PR triggers full integration tests
- After: Only source/dependency changes trigger tests
- Savings: ~65% reduction in unnecessary CI compute

Signed-off-by: Anil Belur <askb23@gmail.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
@askb askb force-pushed the fix/testing-path-filters branch from 742030f to baf70a0 Compare June 4, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Code chores (dependency updates, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants