From 7ca00c0f70f05c3d40a6d6ba6228269894c239e9 Mon Sep 17 00:00:00 2001 From: Mrityunjay Raj Date: Sat, 14 Feb 2026 23:26:41 +0530 Subject: [PATCH] ci: add path filters to lint and codeql workflows, fixes #9328 --- .github/workflows/black.yaml | 10 +++++++++- .github/workflows/codeql-analysis.yml | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index e17f825a2..a19fdee7a 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -3,7 +3,15 @@ name: Lint -on: [push, pull_request] +on: + push: + paths: + - '**.py' + - 'pyproject.toml' + pull_request: + paths: + - '**.py' + - 'pyproject.toml' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3c1d96697..8ef469cbf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -5,9 +5,19 @@ name: "CodeQL" on: push: branches: [ master ] + paths: + - '**.py' + - '**.pyx' + - '**.c' + - '**.h' pull_request: # The branches below must be a subset of the branches above branches: [ master ] + paths: + - '**.py' + - '**.pyx' + - '**.c' + - '**.h' schedule: - cron: '39 2 * * 5'