Skip to content

ci: scope pull request checks to relevant paths#839

Open
manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:agent/add-workflow-path-filters
Open

ci: scope pull request checks to relevant paths#839
manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:agent/add-workflow-path-filters

Conversation

@manuzhang

@manuzhang manuzhang commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

  • For pull requests, run ASF allowlist, Actions CodeQL, and zizmor only for YAML changes under .github.
  • For pull requests, skip AWS, sanitizer, SQL catalog, general test, and C++ lint workflows for Markdown, documentation, devcontainer, and release-development-only changes.
  • Keep license and pre-commit checks unfiltered.

Why

These workflows currently run on pull requests even when every changed path is unrelated to what they validate. Directory and extension globs keep the filters applicable to future files without maintaining filename lists, and keeping filters off push triggers avoids duplicate maintenance.

Impact

Documentation and development-only pull requests avoid unrelated CI work. Mixed changes still run the relevant workflows, GitHub YAML changes still run the Actions validators, and main, tag, and scheduled runs remain unfiltered.

@manuzhang
manuzhang marked this pull request as ready for review July 22, 2026 09:14
Copilot AI review requested due to automatic review settings July 22, 2026 09:14
Filter pull request checks without duplicating path lists on push triggers. Run Actions validators for GitHub YAML changes, and skip build, test, and lint workflows for documentation and development-only paths. Keep license and pre-commit checks unfiltered.

Co-authored-by: Codex <codex@openai.com>
@manuzhang
manuzhang force-pushed the agent/add-workflow-path-filters branch from 29d8f70 to 626a80f Compare July 22, 2026 09:18
@manuzhang manuzhang changed the title ci: scope checks to relevant path changes ci: scope pull request checks to relevant paths Jul 22, 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

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR narrows CI workflow execution using GitHub Actions path filters so that expensive checks only run when relevant files change (especially docs/dev-only vs CI config changes).

Changes:

  • Scoped ASF allowlist, Actions CodeQL, and zizmor workflows to run on PRs only when .github/**/*.yml(yaml) changes.
  • Added paths-ignore filters to multiple test/lint workflows to skip PR runs for markdown/docs/devcontainer/dev-only changes.
  • Expanded cpp-linter PR paths-ignore filters and removed paths-ignore for the push trigger.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/zizmor.yml Adds PR path filters so zizmor runs only for .github YAML changes.
.github/workflows/test.yml Adds PR paths-ignore to skip general tests for docs/dev-only changes.
.github/workflows/sql_catalog_test.yml Adds PR paths-ignore to skip SQL catalog tests for docs/dev-only changes.
.github/workflows/sanitizer_test.yml Adds PR paths-ignore to skip sanitizer tests for docs/dev-only changes.
.github/workflows/cpp-linter.yml Expands PR ignore patterns and removes push ignore patterns.
.github/workflows/codeql.yml Adds PR path filters so CodeQL runs only for .github YAML changes.
.github/workflows/aws_test.yml Adds PR paths-ignore to skip AWS tests for docs/dev-only changes.
.github/workflows/asf-allowlist-check.yml Adds PR path filters so allowlist check runs only for .github YAML changes.

Comment thread .github/workflows/cpp-linter.yml Outdated
Comment on lines 21 to 24
@@ -22,17 +22,27 @@ on:
branches:
- main
paths-ignore:
Comment on lines 25 to 30
- main
paths:
- '.github/**/*.yml'
- '.github/**/*.yaml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
Comment thread .github/workflows/test.yml Outdated
Comment on lines 28 to 33
- '*.md'
- '**/*.md'
- 'dev/**'
- 'mkdocs/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
Comment thread .github/workflows/test.yml Outdated
Comment on lines +25 to +27
- '**'
paths-ignore:
- '.devcontainer/**'
@manuzhang
manuzhang requested review from Copilot and wgtmac July 22, 2026 09:31

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment on lines +28 to +33
paths-ignore:
- '.devcontainer/**'
- '*.md'
- '**/*.md'
- 'dev/**'
- 'mkdocs/**'
Comment on lines +28 to +33
paths-ignore:
- '.devcontainer/**'
- '*.md'
- '**/*.md'
- 'dev/**'
- 'mkdocs/**'
Co-authored-by: Codex <codex@openai.com>
Copilot AI review requested due to automatic review settings July 22, 2026 09:59

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment on lines +28 to +32
paths-ignore:
- '.devcontainer/**'
- '**/*.md'
- 'dev/**'
- 'mkdocs/**'
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.

2 participants