Skip to content

Commit

Permalink
test-ci.sh: only echo on error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhcl committed Jun 6, 2024
1 parent dee680f commit 34da0f0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/test-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,16 @@ function run_all_tests_pr {
return 0
fi

echo 'Passed tests check'

while read line; do
readarray -td$'\t' entry < <(echo -n "$line")

echo 'Read array'

local file1="${entry[1]}"
local file2="${entry[2]}"

echo "Testing $file1 and $file2"
if [[ $file1 == *.md* ]]; then
test_pages "$file1 $file2"
fi
if [[ $file1 == *.py* ]]; then
echo 'Testing script(s)'
test_python_scripts "$file1 $file2"
fi
done <<< "$git_diff"
Expand All @@ -49,7 +43,7 @@ function run_all_tests_pr {
# Special test function for GitHub Actions pull request builds.
# Runs run_all_tests_pr collecting errors for tldr-bot.
function run_tldr_bot_tests {
run_all_tests_pr 2>&1
errs=$(run_all_tests_pr 2>&1)

if [[ -n $errs ]]; then
echo -e "Test failed!\n$errs\n" >&2
Expand Down

0 comments on commit 34da0f0

Please sign in to comment.