summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml18
1 files changed, 13 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index eb88df01b..225677f1a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -114,13 +114,21 @@ jobs:
else
BASE=HEAD^1
fi
- if git diff --name-only -z $BASE...HEAD |
- grep --null-data -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then
- echo "should-run=true" >> $GITHUB_OUTPUT
+
+ shouldRun=true
+ if files="$(git diff --name-only $BASE...HEAD)"; then
+ # Git diff succeeded, check if non-documentation files were changed
+ if echo "$files" | grep -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then
+ shouldRun=true
+ else
+ echo "Only documentation files changed, skipping remaining steps"
+ shouldRun=false
+ fi
else
- echo "Only documentation files changed, skipping remaining steps"
- echo "should-run=false" >> $GITHUB_OUTPUT
+ echo "Git diff failed, conservatively running tests"
+ shouldRun=true
fi
+ echo "should-run=$shouldRun" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
if [[ "${{ matrix.os }}" = "linux" ]]; then