From 59632358b5a4e48c4dc396756859b4185e22eeb9 Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Sat, 8 Mar 2025 19:09:35 +0800 Subject: [PATCH] update workflow to fix format issue --- .github/workflows/taosd-ci.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/taosd-ci.yml b/.github/workflows/taosd-ci.yml index 60e6efe650..8789041b91 100644 --- a/.github/workflows/taosd-ci.yml +++ b/.github/workflows/taosd-ci.yml @@ -18,8 +18,6 @@ concurrency: cancel-in-progress: true env: - # WKDIR: '/var/lib/jenkins/workspace' - # WK: '/var/lib/jenkins/workspace/TDinternal' WKC: '/var/lib/jenkins/workspace/TDinternal/community' jobs: @@ -36,10 +34,12 @@ jobs: run: | set -euo pipefail target_branch=${{ github.event.pull_request.base.ref }} - # check whether to run tdgpt test cases + + # Check whether to run tdgpt test cases cd ${{ env.WKC }} changed_files_non_doc=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $target_branch) | grep -v "^docs/en/" | grep -v "^docs/zh/" | grep -v ".md$" | tr '\n' ' ' || :) - echo “changed files exclude doc, ${changed_files_non_doc}" + echo "changed files exclude doc: ${changed_files_non_doc}" + if [[ -n "$changed_files_non_doc" && "$changed_files_non_doc" =~ (forecastoperator\.c|anomalywindowoperator\.c|tanalytics\.h|tanalytics\.c|tdgpt_cases\.task|analytics|tdgpt) ]]; then run_tdgpt_test="true" else @@ -47,14 +47,15 @@ jobs: fi echo "run tdgpt test: ${run_tdgpt_test}" - # check whether to run function test cases + # Check whether to run function test cases changed_files_non_tdgpt=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $target_branch) | \ grep -v "^docs/en/" | \ grep -v "^docs/zh/" | \ grep -v ".md$" | \ grep -Ev "forecastoperator\.c|anomalywindowoperator\.c|tanalytics\.h|tanalytics\.c|tdgpt_cases\.task|analytics|tdgpt" | \ - tr '\n' ' ' || :) - echo "changed file exclude tdgpt: ${changed_files_non_tdgpt}" + tr '\n' ' ' || :) + echo "changed files exclude tdgpt: ${changed_files_non_tdgpt}" + if [ -n "$changed_files_non_tdgpt" ]; then run_function_test="true" else @@ -62,6 +63,7 @@ jobs: fi echo "run function test: ${run_function_test}" + # Output the results for GitHub Actions echo "run_function_test=$run_function_test" >> $GITHUB_OUTPUT echo "run_tdgpt_test=$run_tdgpt_test" >> $GITHUB_OUTPUT