使用 gotestsum 在 CI 修复循环中总结失败的 Go 测试运行并重新运行浮动测试
Use gotestsum to turn noisy go test output into compact failure summaries, JUnit or JSON artifacts, and optional reruns of flaky tests before an agent starts fixing Go code.
Prerequisites
gotestsum, Go toolchain
Installation
Requirements and caveats from upstream:
- The nerdfonts icons requires a font from Nerd Fonts.
- Note that using --rerun-fails may require the use of other flags, depending on
- moby (aka Docker)
Basic usage or getting-started notes:
- gotestsum runs tests using go test -json, prints formatted test output, and a summary of the test run.
- Download a binary from releases, or build from
- source with go install gotest.tools/gotestsum@latest. To run without installing use
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/gotestyourself/gotestsum/HEAD/README.md
Documentation
- https://github.com/1991513ccie-png/skills