From df4ebaa32d0992c69e850e0b0689ab7ec4124d8a Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 12 Jul 2025 20:02:13 +0200 Subject: [PATCH] [CI] Introduce path limits for workflow runs --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ .github/workflows/pre-commit.yml | 6 ++++++ .github/workflows/static-analysis-pr.yml | 11 ++++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c722177c..90b223b56 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,27 @@ on: workflow_call: + push: + paths: + - '**/*.cpp' + - '**/*.hpp' + - '**/*.c' + - '**/*.h' + - '**/*.py' + - '**/*.sh' + - '.clang-format' + - 'setup.cfg' + - '.github/workflows/lint.yml' + pull_request: + paths: + - '**/*.cpp' + - '**/*.hpp' + - '**/*.c' + - '**/*.h' + - '**/*.py' + - '**/*.sh' + - '.clang-format' + - 'setup.cfg' + - '.github/workflows/lint.yml' jobs: clang-format: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1b4b6abe2..162f05989 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -2,6 +2,12 @@ name: Pre-commit checks on: pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' + - '*.txt' + - 'LICENSE' jobs: pre-commit: diff --git a/.github/workflows/static-analysis-pr.yml b/.github/workflows/static-analysis-pr.yml index e1d09e537..3b0c271bd 100644 --- a/.github/workflows/static-analysis-pr.yml +++ b/.github/workflows/static-analysis-pr.yml @@ -1,6 +1,15 @@ name: Static analysis -on: [pull_request] +on: + pull_request: + paths: + - '**/*.cpp' + - '**/*.hpp' + - '**/*.c' + - '**/*.h' + - '**/CMakeLists.txt' + - '**/*.cmake' + - '.github/workflows/static-analysis-pr.yml' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}