Skip to content

Add path filters to CI to skip unnecessary runs on docs-only PRs (#2379)#2386

Open
mr-raj12 wants to merge 1 commit intoborgbase:masterfrom
mr-raj12:fix/ci-path-filters-2379
Open

Add path filters to CI to skip unnecessary runs on docs-only PRs (#2379)#2386
mr-raj12 wants to merge 1 commit intoborgbase:masterfrom
mr-raj12:fix/ci-path-filters-2379

Conversation

@mr-raj12
Copy link
Contributor

@mr-raj12 mr-raj12 commented Feb 5, 2026

Description

Add paths filter to the pull_request trigger in
.github/workflows/test.yml so CI only runs when relevant source or
configuration files are modified.

PRs that only touch documentation or metadata files (e.g., README.md,
CONTRIBUTING.md, LICENSE) will now skip the full test pipeline.

Paths that trigger CI:

Path Reason
src/** Source code
tests/** Test files
pyproject.toml Dependencies, tool config
uv.lock Dependency lock file
.github/** CI workflows, actions, scripts
noxfile.py Nox test runner config
Makefile Build/test commands
package/** Packaging scripts

push to master and workflow_dispatch remain unfiltered.

Related Issue

Closes #2379

Motivation and Context

The test workflow triggers on all pull requests regardless of files
changed. Docs-only PRs spin up the full pipeline — lint, unit tests across
3 Python versions × 2 OSes, and integration tests — with unit tests alone
having a 120-minute timeout. This wastes GitHub Actions minutes and blocks
contributors.

How Has This Been Tested?

  • CI-only YAML configuration change with no functional code changes
  • YAML syntax validated locally
  • The PR's own CI run validates the workflow file is correctly parsed by
    GitHub Actions

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to change)

Checklist:

  • I have read the
    CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer
Certificate of Origin
.

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.

Add path filters to CI to skip unnecessary test runs on docs-only changes

1 participant