From dd7391a11a7fb6fc6122cbfc429d789adfb43bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:38:12 +0200 Subject: [PATCH] chore(ci): exclude testhelpers root dir from the filters --- .github/workflows/benchmark.yml | 5 ++++- .github/workflows/golangci-lint.yml | 5 ++++- .github/workflows/release-drafter.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 158c4923..5f92fcd1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -28,7 +28,10 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + # Add all testhelpers subdirectories to filters + testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') + filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bb4abea6..ebd07f09 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -31,7 +31,10 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + # Add all testhelpers subdirectories to filters + testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') + filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e42ccc8e..c90f9adc 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,7 +18,7 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT