Skip to content

Commit

Permalink
test: refine workflow output
Browse files Browse the repository at this point in the history
  • Loading branch information
sangshuduo committed Mar 10, 2023
1 parent a37ba86 commit 6c15667
Show file tree
Hide file tree
Showing 18 changed files with 254 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/2.x-centos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
if [ -f ~/taosdump-failed.txt ];then
if [ -f ~/taosdump-failed.txt ]; then
cat ~/taosdump-failed.txt;
exit 1;
fi
4 changes: 2 additions & 2 deletions .github/workflows/2.x-macos-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ jobs:
# fi
# fi
#
# if [ -f taosdump-failed.txt ];then
# if [ -f taosdump-failed.txt ]; then
# cat taosdump-failed.txt;
# exit 1;
# fi
# if [ -f taosbenchmark-failed.txt ];then
# if [ -f taosbenchmark-failed.txt ]; then
# cat taosbenchmark-failed.txt;
# exit 1;
# fi
4 changes: 2 additions & 2 deletions .github/workflows/2.x-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ jobs:
# fi
# fi
#
# if [ -f taosdump-failed.txt ];then
# if [ -f taosdump-failed.txt ]; then
# cat taosdump-failed.txt;
# exit 1;
# fi
# if [ -f taosbenchmark-failed.txt ];then
# if [ -f taosbenchmark-failed.txt ]; then
# cat taosbenchmark-failed.txt;
# exit 1;
# fi
2 changes: 1 addition & 1 deletion .github/workflows/2.x-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
arch: aarch64
distro: ubuntu18.04
run: |
if [ -f ~/taosdump-failed.txt ];then
if [ -f ~/taosdump-failed.txt ]; then
cat ~/taosdump-failed.txt;
exit 1;
fi
16 changes: 12 additions & 4 deletions .github/workflows/2.x-taosbenchmark-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,20 @@ jobs:
sudo pkill -9 taosadapter || :
sudo pkill -9 taosd || :
for i in `find taosbenchmark -name "*.py"|grep -Ev "v3"`; do python3 ./test.py -f $i > /dev/null && echo -e "\033[32m taosbenchmark-debug-test/$i success! \033[0m"|| echo -e "\033[31m taosbenchmark-debug-test/$i failed! \033[0m" | tee -a ~/taosbenchmark-debug-failed.txt ;done
for i in `find taosbenchmark -name "*.py"|grep -Ev "v3"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m taosbenchmark-debug-test/$i success! \033[0m" \
| tee -a ~/taosbenchmark-debug-success.txt \
|| echo -e "\033[31m taosbenchmark-debug-test/$i failed! \033[0m" \
| tee -a ~/taosbenchmark-debug-failed.txt ; \
done
- name: Check Test Result
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
if [ -f ~/taosbenchmark-debug-failed.txt ];then
cat ~/taosbenchmark-debug-failed.txt;
exit 1;
if [ -f ~/taosbenchmark-debug-failed.txt ]; then
cat ~/taosbenchmark-debug-failed.txt
exit 1
elif [ -f ~/taosbenchmark-debug-success.txt ]; then
cat ~/taosbenchmark-debug-success.txt
fi
16 changes: 12 additions & 4 deletions .github/workflows/2.x-taosbenchmark-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,21 @@ jobs:
if find taosbenchmark -name "*.py"|grep -q .;
then
for i in `find taosbenchmark -name "*.py"|grep -Ev "v3"`; do python3 ./test.py -f $i > /dev/null && echo -e "\033[32m taosbenchmark-release-test/$i success! \033[0m"|| echo -e "\033[31m taosbenchmark-release-test/$i failed! \033[0m" | tee -a ~/taosbenchmark-release-failed.txt ;done
for i in `find taosbenchmark -name "*.py"|grep -Ev "v3"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m taosbenchmark-release-test/$i success! \033[0m" \
| tee -a ~/taosbenchmark-release-success.txt \
|| echo -e "\033[31m taosbenchmark-release-test/$i failed! \033[0m" \
| tee -a ~/taosbenchmark-release-failed.txt; \
done
fi
- name: Check Test Result
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
if [ -f ~/taosbenchmark-release-failed.txt ];then
cat ~/taosbenchmark-release-failed.txt;
exit 1;
if [ -f ~/taosbenchmark-release-failed.txt ]; then
cat ~/taosbenchmark-release-failed.txt
exit 1
elif [ -f ~/taosbenchmark-release-success.txt ]; then
cat ~/taosbenchmark-release-success.txt
fi
41 changes: 25 additions & 16 deletions .github/workflows/2.x-taosdump-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ jobs:
for i in `find 5-taos-tools/taosdump -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m system-test/$i success! \033[0m" \
|| echo -e "\033[31m system-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; done
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m system-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: taosdump Old Test
Expand All @@ -139,7 +141,8 @@ jobs:
sudo pkill -9 taosd || :
python3 test.py -f 5-taos-tools/TD-12478.py > /dev/null \
&& echo -e "\033[32m system-test/5-taos-tools/TD-12478.py success! \033[0m" \
|| echo -e "\033[31m system-test/5-taos-tools/TD-12478.py failed! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m system-test/5-taos-tools/TD-12478.py failed! \033[0m" \
| tee -a ~/taosdump-failed.txt
- name: taosdump Develop Test
Expand All @@ -151,11 +154,13 @@ jobs:
if find taosdump/native -name "*.py"|grep -q .;
then
for i in `find taosdump/native -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt ;done
for i in `find taosdump/native -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: taosdump special Develop Test
Expand All @@ -167,17 +172,21 @@ jobs:
if find taosdump/native2 -name "*.py"|grep -q .;
then
for i in `find taosdump/native2 -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt ;done
for i in `find taosdump/native2 -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: Check Test Result
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
if [ -f ~/taosdump-failed.txt ];then
cat ~/taosdump-failed.txt;
exit 1;
if [ -f ~/taosdump-failed.txt ]; then
cat ~/taosdump-failed.txt
exit 1
elif [ -f ~/taosdump-success.txt ]; then
cat ~/taosdump-success.txt
fi
57 changes: 34 additions & 23 deletions .github/workflows/2.x-taosdump-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ jobs:
if find tools -name "taosdump*.py"|grep -q .;
then
for i in `find tools -name "taosdump*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; done
for i in `find tools -name "taosdump*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: taosdump System Test
Expand All @@ -131,11 +133,13 @@ jobs:
sudo pkill -9 taosd || :
if find 5-taos-tools/taosdump -name "*.py"|grep -q .;
then
for i in `find 5-taos-tools/taosdump -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
for i in `find 5-taos-tools/taosdump -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m system-test/$i success! \033[0m" \
|| echo -e "\033[31m system-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; done
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m system-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: taosdump Old Test
Expand All @@ -145,8 +149,9 @@ jobs:
sudo pkill -9 taosadapter || :
sudo pkill -9 taosd || :
python3 test.py -f 5-taos-tools/TD-12478.py > /dev/null \
&& echo -e "\033[32m system-test/5-taos-tools/TD-12478.py success! \033[0m" \
|| echo -e "\033[31m system-test/5-taos-tools/TD-12478.py failed! \033[0m" \
&& echo -e "\033[32m system-test/5-taos-tools/TD-12478.py success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m system-test/5-taos-tools/TD-12478.py failed! \033[0m" \
| tee -a ~/taosdump-failed.txt
- name: taosdump Develop Test
Expand All @@ -159,10 +164,12 @@ jobs:
if find taosdump/native -name "*.py"|grep -q .;
then
for i in `find taosdump/native -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m develop-test/$i success! \033[0m" \
|| echo -e "\033[31m develop-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt ;done
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m develop-test/$i success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m develop-test/$i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt ; \
done
fi
- name: taosdump special Develop Test
Expand All @@ -174,17 +181,21 @@ jobs:
if find taosdump/native2 -name "*.py"|grep -q .;
then
for i in `find taosdump/native2 -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt ;done
for i in `find taosdump/native2 -name "*.py"`; \
do python3 ./test.py -f $i > /dev/null \
&& echo -e "\033[32m $i success! \033[0m" \
| tee -a ~/taosdump-success.txt \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosdump-failed.txt; \
done
fi
- name: Check Test Result
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
if [ -f ~/taosdump-failed.txt ];then
cat ~/taosdump-failed.txt;
exit 1;
if [ -f ~/taosdump-failed.txt ]; then
cat ~/taosdump-failed.txt
exit 1
elif [ -f ~/taosdump-success.txt ]; then
cat ~/taosdump-success.txt
fi
4 changes: 2 additions & 2 deletions .github/workflows/2.x-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ jobs:
# fi
# fi
#
# if [ -f taosdump-failed.txt ];then
# if [ -f taosdump-failed.txt ]; then
# cat taosdump-failed.txt;
# exit 1;
# fi
# if [ -f taosbenchmark-failed.txt ];then
# if [ -f taosbenchmark-failed.txt ]; then
# cat taosbenchmark-failed.txt;
# exit 1;
# fi
2 changes: 1 addition & 1 deletion .github/workflows/3.0-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
python3 ./test.py -f taosdump/old/taosdumpTest.py && echo -e "\033[32m taosdumpTest.py success! \033[0m" || echo -e "\033[31m taosdumpTest.py failed! \033[0m" | tee -a ~/taosdump-failed.txt
if [ -f ~/taosdump-failed.txt ];then
if [ -f ~/taosdump-failed.txt ]; then
cat ~/taosdump-failed.txt;
exit 1;
fi
44 changes: 37 additions & 7 deletions .github/workflows/3.0-taosbenchmark-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ jobs:
if find taosbenchmark -name "*.py"|grep -q .;
then
for i in `find taosbenchmark -name "*.py"|grep -Ev "v2|websocket|taosdemo|kill-slow-query|cloud"|sort`; do printf $i && python3 ./test.py -f $i > /dev/null && echo -e " \033[32m taosbenchmark-release-test/$i success! \033[0m"|| echo -e " \033[31m taosbenchmark-release-test/$i failed! \033[0m" | tee -a ~/taosbenchmark-release-failed.txt; done
for i in `find taosbenchmark -name "*.py"|grep -Ev "v2|websocket|taosdemo|kill-slow-query|cloud"|sort`; \
do printf $i && python3 ./test.py -f $i > /dev/null \
&& echo -e " \033[32m taosbenchmark-release-test/$i success! \033[0m" \
| tee -a ~/taosbenchmark-release-success.txt \
|| echo -e " \033[31m taosbenchmark-release-test/$i failed! \033[0m" \
| tee -a ~/taosbenchmark-release-failed.txt; \
done
fi
- name: Run cloud test cases
Expand All @@ -179,7 +185,13 @@ jobs:
if find taosbenchmark/v3 -name "cloud*.py"|grep -q .;
then
for i in `find taosbenchmark/v3 -name "cloud*.py"`; do printf $i && python3 ./test.py -f $i && echo -e " \033[32m benchmark-cloud-test:$i success! \033[0m"|| echo -e " \033[31m benchmark-cloud-test:$i failed! \033[0m" | tee -a ~/taosbenchmark-cloud-failed.txt; done
for i in `find taosbenchmark/v3 -name "cloud*.py"`; \
do printf $i && python3 ./test.py -f $i \
&& echo -e " \033[32m benchmark-cloud-test:$i success! \033[0m" \
| tee -a ~/taosbenchmark-cloud-success.txt \
|| echo -e " \033[31m benchmark-cloud-test:$i failed! \033[0m" \
| tee -a ~/taosbenchmark-cloud-failed.txt; \
done
fi
- name: Test WebSocket cases
Expand All @@ -192,7 +204,13 @@ jobs:
if find taosbenchmark/v3 -name "*.py"|grep -q .;
then
for i in `find taosbenchmark/v3 -name "websocket*.py"`; do printf $i && python3 ./test.py -f $i > /dev/null && echo -e " \033[32m benchmark-ws-test:$i success! \033[0m"|| echo -e " \033[31m benchmark-ws-test:$i failed! \033[0m" | tee -a ~/taosbenchmark-ws-failed.txt; done
for i in `find taosbenchmark/v3 -name "websocket*.py"`; \
do printf $i && python3 ./test.py -f $i > /dev/null \
&& echo -e " \033[32m benchmark-ws-test:$i success! \033[0m" \
| tee -a ~/taosbenchmark-ws-success.txt \
|| echo -e " \033[31m benchmark-ws-test:$i failed! \033[0m" \
| tee -a ~/taosbenchmark-ws-failed.txt; \
done
fi
- name: Test taosdemo query
Expand All @@ -205,7 +223,13 @@ jobs:
if find taosbenchmark -name "taosdemo*.py"|grep -Ev "v2"|grep -q .;
then
for i in `find taosbenchmark -name "taosdemo*.py"|grep -Ev "v2"`; do printf $i && python3 ./test.py -f $i && echo -e "\033[32m $i success! \033[0m"|| echo -e "\033[31m $i failed! \033[0m" | tee -a ~/taosbenchmark-release-failed.txt; done
for i in `find taosbenchmark -name "taosdemo*.py"|grep -Ev "v2"`; \
do printf $i && python3 ./test.py -f $i \
&& echo -e "\033[32m $i success! \033[0m" \
| tee -a ~/taosbenchmark-release-success.txt \
|| echo -e "\033[31m $i failed! \033[0m" \
| tee -a ~/taosbenchmark-release-failed.txt; \
done
fi
- name: 'Upload taosd logs'
Expand All @@ -221,17 +245,23 @@ jobs:
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
if [ -f ~/taosbenchmark-release-failed.txt ];then
if [ -f ~/taosbenchmark-release-failed.txt ]; then
cat ~/taosbenchmark-release-failed.txt
exit 1
elif [ -f ~/taosbenchmark-release-success.txt ]; then
cat ~/taosbenchmark-release-success.txt
fi
if [ -f ~/taosbenchmark-cloud-failed.txt ];then
if [ -f ~/taosbenchmark-cloud-failed.txt ]; then
cat ~/taosbenchmark-cloud-failed.txt
exit 1
elif [ -f ~/taosbenchmark-cloud-success.txt ]; then
cat ~/taosbenchmark-cloud-success.txt
fi
if [ -f ~/taosbenchmark-ws-failed.txt ];then
if [ -f ~/taosbenchmark-ws-failed.txt ]; then
cat ~/taosbenchmark-ws-failed.txt
exit 1
elif [ -f ~/taosbenchmark-ws-success.txt ]; then
cat ~/taosbenchmark-ws-success.txt
fi
Loading

0 comments on commit 6c15667

Please sign in to comment.