diff --git a/bin/.local/bin/gotestsum-notify b/bin/.local/bin/gotestsum-notify new file mode 100755 index 0000000..6160eb5 --- /dev/null +++ b/bin/.local/bin/gotestsum-notify @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +content="Tests: $TESTS_TOTAL (skipped: $TESTS_SKIPPED)" + +if [[ "$TESTS_ERRORS" != "0" ]]; then + title="⚠️ TESTS ERROR" + content="$content\nErrors: $TESTS_ERRORS" + urgency=critical +elif [[ "$TESTS_FAILED" != "0" ]]; then + title="❌ TESTS FAILED" + content="$content\nErrors: $TESTS_FAILED" + urgency=critical +else + title="✅ TESTS SUCCEDED" + urgency=normal +fi + + +notify-send --category gotestsum --urgency "$urgency" "$title" "\n$content"