From fae634070b630ab572b04676a6cd61545e1b9b44 Mon Sep 17 00:00:00 2001 From: Rip&Tear <84775494+theCyberTech@users.noreply.github.com> Date: Wed, 5 Aug 2026 16:38:45 +0800 Subject: [PATCH] ci: skip python heavy CI on Actions-only PRs (#6818) Exclude .github/** from the code path filter used by tests, lint, type-checker, and vulnerability-scan so workflow-only changes (including CodeQL) do not run the Python matrix. CodeQL itself is unchanged and still analyzes Actions YAML on those PRs. Co-authored-by: Cursor Agent Co-authored-by: Rip&Tear Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com> --- .github/workflows/linter.yml | 5 +++-- .github/workflows/tests.yml | 5 +++-- .github/workflows/type-checker.yml | 5 +++-- .github/workflows/vulnerability-scan.yml | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 245ba9fec..7c99c7476 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -18,13 +18,14 @@ jobs: with: # Exclusion-only patterns match every non-excluded file under the # default "some" quantifier. Require all patterns (including "**") - # so docs-only / markdown-only PRs correctly set code=false. + # so docs/markdown/Actions-only PRs correctly set code=false. predicate-quantifier: every filters: | code: - '**' - '!docs/**' - '!**/*.md' + - '!.github/**' lint-run: needs: changes @@ -81,7 +82,7 @@ jobs: - name: Check results run: | if [ "${{ needs.changes.outputs.code }}" != "true" ]; then - echo "Docs-only change, skipping lint" + echo "Non-code change, skipping lint" exit 0 fi if [ "${{ needs.lint-run.result }}" == "success" ]; then diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e4d77a60..f1df7bd78 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,13 +18,14 @@ jobs: with: # Exclusion-only patterns match every non-excluded file under the # default "some" quantifier. Require all patterns (including "**") - # so docs-only / markdown-only PRs correctly set code=false. + # so docs/markdown/Actions-only PRs correctly set code=false. predicate-quantifier: every filters: | code: - '**' - '!docs/**' - '!**/*.md' + - '!.github/**' tests-matrix: name: tests (${{ matrix.python-version }}) @@ -131,7 +132,7 @@ jobs: - name: Check results run: | if [ "${{ needs.changes.outputs.code }}" != "true" ]; then - echo "Docs-only change, skipping tests" + echo "Non-code change, skipping tests" exit 0 fi if [ "${{ needs.tests-matrix.result }}" == "success" ]; then diff --git a/.github/workflows/type-checker.yml b/.github/workflows/type-checker.yml index a9088381b..5ca0bbb05 100644 --- a/.github/workflows/type-checker.yml +++ b/.github/workflows/type-checker.yml @@ -18,13 +18,14 @@ jobs: with: # Exclusion-only patterns match every non-excluded file under the # default "some" quantifier. Require all patterns (including "**") - # so docs-only / markdown-only PRs correctly set code=false. + # so docs/markdown/Actions-only PRs correctly set code=false. predicate-quantifier: every filters: | code: - '**' - '!docs/**' - '!**/*.md' + - '!.github/**' type-checker-matrix: name: type-checker (${{ matrix.python-version }}) @@ -85,7 +86,7 @@ jobs: - name: Check results run: | if [ "${{ needs.changes.outputs.code }}" != "true" ]; then - echo "Docs-only change, skipping type checks" + echo "Non-code change, skipping type checks" exit 0 fi if [ "${{ needs.type-checker-matrix.result }}" == "success" ]; then diff --git a/.github/workflows/vulnerability-scan.yml b/.github/workflows/vulnerability-scan.yml index 2f9834edc..0c760c6ba 100644 --- a/.github/workflows/vulnerability-scan.yml +++ b/.github/workflows/vulnerability-scan.yml @@ -26,13 +26,14 @@ jobs: with: # Exclusion-only patterns match every non-excluded file under the # default "some" quantifier. Require all patterns (including "**") - # so docs-only / markdown-only PRs correctly set code=false. + # so docs/markdown/Actions-only PRs correctly set code=false. predicate-quantifier: every filters: | code: - '**' - '!docs/**' - '!**/*.md' + - '!.github/**' - name: Set code output id: set run: |