update workflow to fix format issue
This commit is contained in:
parent
e5fcdddea0
commit
59632358b5
|
@ -18,8 +18,6 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# WKDIR: '/var/lib/jenkins/workspace'
|
|
||||||
# WK: '/var/lib/jenkins/workspace/TDinternal'
|
|
||||||
WKC: '/var/lib/jenkins/workspace/TDinternal/community'
|
WKC: '/var/lib/jenkins/workspace/TDinternal/community'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -36,10 +34,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
target_branch=${{ github.event.pull_request.base.ref }}
|
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 }}
|
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' ' ' || :)
|
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
|
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"
|
run_tdgpt_test="true"
|
||||||
else
|
else
|
||||||
|
@ -47,14 +47,15 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "run tdgpt test: ${run_tdgpt_test}"
|
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) | \
|
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/en/" | \
|
||||||
grep -v "^docs/zh/" | \
|
grep -v "^docs/zh/" | \
|
||||||
grep -v ".md$" | \
|
grep -v ".md$" | \
|
||||||
grep -Ev "forecastoperator\.c|anomalywindowoperator\.c|tanalytics\.h|tanalytics\.c|tdgpt_cases\.task|analytics|tdgpt" | \
|
grep -Ev "forecastoperator\.c|anomalywindowoperator\.c|tanalytics\.h|tanalytics\.c|tdgpt_cases\.task|analytics|tdgpt" | \
|
||||||
tr '\n' ' ' || :)
|
tr '\n' ' ' || :)
|
||||||
echo "changed file exclude tdgpt: ${changed_files_non_tdgpt}"
|
echo "changed files exclude tdgpt: ${changed_files_non_tdgpt}"
|
||||||
|
|
||||||
if [ -n "$changed_files_non_tdgpt" ]; then
|
if [ -n "$changed_files_non_tdgpt" ]; then
|
||||||
run_function_test="true"
|
run_function_test="true"
|
||||||
else
|
else
|
||||||
|
@ -62,6 +63,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "run function test: ${run_function_test}"
|
echo "run function test: ${run_function_test}"
|
||||||
|
|
||||||
|
# Output the results for GitHub Actions
|
||||||
echo "run_function_test=$run_function_test" >> $GITHUB_OUTPUT
|
echo "run_function_test=$run_function_test" >> $GITHUB_OUTPUT
|
||||||
echo "run_tdgpt_test=$run_tdgpt_test" >> $GITHUB_OUTPUT
|
echo "run_tdgpt_test=$run_tdgpt_test" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue