From b1295cc9b4975a9050f0519ba9f60eaeed3c948e Mon Sep 17 00:00:00 2001 From: rsk0315 Date: Mon, 12 Feb 2024 20:46:58 +0900 Subject: [PATCH] scripts --- scripts/ci-test.zsh | 56 +++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/scripts/ci-test.zsh b/scripts/ci-test.zsh index b3909d096d..fb131c8f55 100644 --- a/scripts/ci-test.zsh +++ b/scripts/ci-test.zsh @@ -74,32 +74,34 @@ cargo_test "$pass_lib" "$fail_lib" "$notest_lib" '--lib --release' cargo_test "$pass_doc" "$fail_doc" "$notest_doc" '--doc --release' (( ? == 0 )) || fail=t -echo '## :x: failed (`--lib`)' -cat $fail_lib - -echo '---' - -echo '## :x: failed (`--doc`)' -cat $fail_doc - -echo '---' - -echo '## :sparkles: passed (`--lib`)' -cat $pass_lib - -echo '---' - -echo '## :sparkles: passed (`--doc`)' -cat $pass_doc - -echo '---' - -echo '## :smiling_face_with_tear: not tested (`--lib`)' -cat $notest_lib - -echo '---' - -echo '## :smiling_face_with_tear: not tested (`--doc`)' -cat $notest_doc +if [[ -s $fail_lib ]]; then + echo '## :x: failed (`--lib`)' + cat $fail_lib +fi + +if [[ -s $fail_doc ]]; then + echo '## :x: failed (`--doc`)' + cat $fail_doc +fi + +if [[ -s $pass_lib ]]; then + echo '## :sparkles: passed (`--lib`)' + cat $pass_lib +fi + +if [[ -s $pass_doc ]]; then + echo '## :sparkles: passed (`--doc`)' + cat $pass_doc +fi + +if [[ -s $notest_lib ]]; then + echo '## :smiling_face_with_tear: not tested (`--lib`)' + cat $notest_lib +fi + +if [[ -s $notest_doc ]]; then + echo '## :smiling_face_with_tear: not tested (`--doc`)' + cat $notest_doc +fi [[ "$failed" != t ]]