From 701c4be79c455e31a8b9bb0fe0f5cb73225a3081 Mon Sep 17 00:00:00 2001 From: gindibay Date: Fri, 13 Oct 2023 11:15:25 +0300 Subject: [PATCH] Replaced tests with comma --- .github/workflows/build_and_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f5a255bc5..5a24dc02d 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -432,8 +432,8 @@ jobs: - name: Detect regression tests need to be ran id: detect-regression-tests run: |- - detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | (grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' || true)) - tests=${detected_changes// /,} + detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' | tr '\n' ',') + tests=$(echo "${detected_changes}" | sed 's/,$//') if [ -z "${tests}" ]; then echo "No test found." else @@ -463,7 +463,7 @@ jobs: - name: Run minimal tests run: |- tests="${{ needs.test-flakyness-pre.outputs.tests }}" - IFS=',' read -ra tests_array <<< "${tests}" + IFS=',' read -ra tests_array <<< "$tests" for test in "${tests_array[@]}" do test_name=$(echo "${test}" | sed -r "s/.+\/(.+)\..+/\1/")