Merge pull request #30076 from taosdata/ciup30
ci: update ci workflow to debug tdgpt and function test condition
This commit is contained in:
commit
5ebe47c18c
|
@ -10,7 +10,7 @@ on:
|
||||||
- 'packaging/**'
|
- 'packaging/**'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [run-tests]
|
types: [trigger-tests-from-tdinternal]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.event.client_payload.ref}}-${{ github.event_name == 'repository_dispatch' && 'dispatch' || ''}}
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.event.client_payload.ref}}-${{ github.event_name == 'repository_dispatch' && 'dispatch' || ''}}
|
||||||
|
@ -55,21 +55,29 @@ jobs:
|
||||||
|
|
||||||
# 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}"
|
||||||
if [[ "$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
|
||||||
run_tdgpt_test="false"
|
run_tdgpt_test="false"
|
||||||
fi
|
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' ' ' ||:)
|
changed_files_non_tdgpt=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $target_branch) | \
|
||||||
if [ "$changed_files_non_tdgpt" != '' ]; then
|
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}"
|
||||||
|
if [ -n "$changed_files_non_tdgpt" ]; then
|
||||||
run_function_test="true"
|
run_function_test="true"
|
||||||
else
|
else
|
||||||
run_function_test="false"
|
run_function_test="false"
|
||||||
fi
|
fi
|
||||||
|
echo "run function test: ${run_function_test}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "tdinternal=$tdinternal" >> $GITHUB_OUTPUT
|
echo "tdinternal=$tdinternal" >> $GITHUB_OUTPUT
|
||||||
|
|
Loading…
Reference in New Issue