From 6171c9d45d61fa2cc12d5f3ec929c50b0c26fb0e Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Tue, 10 May 2022 22:30:03 +0300 Subject: [PATCH] Only test format when it is wanted --- .github/workflows/format.yml | 4 ++++ tests/test-format.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8962d9d0..9ebacc03 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -3,6 +3,10 @@ name: Code formatting on: pull_request: branches: [ master, develop ] + paths: + - '**.cpp' + - '**.h' + - '!src/libs/**' jobs: test-format: diff --git a/tests/test-format.sh b/tests/test-format.sh index 1dd9cdbd..86667c75 100755 --- a/tests/test-format.sh +++ b/tests/test-format.sh @@ -16,6 +16,7 @@ for file in $CHANGED_FILES do [ -e "$file" ] || continue case "$file" in + src/libs/*) continue ;; *.cpp|*.h) echo Checking "$file" clang-format -i "$file"