sage icon indicating copy to clipboard operation
sage copied to clipboard

sggo: TestCommand is not cacheable

Open ericwenn opened this issue 3 years ago • 1 comments

sggo.TestCommand prevents test results from being cached by go tooling. According to go docs the only flags that may be set for caching to apply is

-benchtime, -cpu, -list, -parallel, -run, -short, -timeout, -failfast, and -v

See docs

After some local testing it seems that -race does not impact caching either.

sggo.TestCommand currently sets the following flags as well (which prevents cache):

  • -race
  • -shuffle on
  • -coverprofile
  • -covermode

It would be great if the default testing with go is cached, to improve feedback velocity when building locally. Perhaps two different targets:

  • sggo.TestCommand (cached)
  • sggo.TestCoverCommand (not-cached)

ericwenn avatar Apr 02 '22 08:04 ericwenn

This issue has been open for 365 days with no activity. Marking as stale.

github-actions[bot] avatar Apr 08 '24 08:04 github-actions[bot]