Skip to content

Commit

Permalink
run all tests in one workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Dec 1, 2024
1 parent 5a1f026 commit df0ea11
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/test_subfolders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ for dir in $(find . -name "go.mod" -not -path "./go.mod" -exec dirname {} \;); d
echo "Running tests in $dir..."

# Run tests normally in all other directories
(cd "$dir" && go test ./... -short)
(cd "$dir" && go test ./... -short) || any_test_failed=1
done

# Check if any test failed and exit with a non-zero status
if [ "$any_test_failed" -ne 0 ]; then
echo "The tests did not pass. Please check the errors above."
exit 1
fi

echo "All tests passed successfully."

0 comments on commit df0ea11

Please sign in to comment.