gotestyourself / gotestsum

'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
Apache License 2.0
2.1k stars 124 forks source link

Add a cross-platform tool for desktop notifications using --post-run-command #116

Open dnephin opened 4 years ago

dnephin commented 4 years ago

Building on #74 (#76) it would be nice to have a cross-platform way of using desktop notifications.

I'd like to avoid additional golang dependencies in gotestsum and use the os/exec approach for running the notification.

A couple options that come to mind:

  1. If there are widely used CLI tools (such as terminal-notifier in contrib/notify/notify-macos.go) we could add a new cmd/tool/notify which detects which CLI is available and shells out to the correct CLI
  2. We could build a separate binary using something like https://github.com/martinlindhe/notify and make it available to download from the github releases page.
ShiinaOrez commented 4 years ago

Good issue, and cross-platform is important, I prefer to option 2, call notifier without user permission isn't a good behavior. Build a light and cross-platform notifier is enough.