diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-06 12:00:20 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-06 12:00:20 +0300 |
| commit | fb7f1699e27b2b9533f00b01cf8eac8fce83c361 (patch) | |
| tree | a4d7e26fc80cdac857c16e62cd3260e4007a7094 | |
| parent | adbf3185edb1ff56f59d328955c3422817411cfc (diff) | |
Enable -race and -count=1 in mage Test target
Adds the Go race detector to the default Test target in Magefile.go
and includes -count=1 to avoid stale cached results. This improves
reliability for concurrent code paths and CI runs.
Refs: v0
| -rw-r--r-- | Magefile.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Magefile.go b/Magefile.go index 9a82995..f7b79f2 100644 --- a/Magefile.go +++ b/Magefile.go @@ -25,9 +25,9 @@ func Build() error { return sh.RunV("go", "build", "-o", binaryName, "./cmd/player") } -// Test runs all tests in the project. +// Test runs all tests in the project with the race detector enabled. func Test() error { - return sh.RunV("go", "test", "./...") + return sh.RunV("go", "test", "-race", "-count=1", "./...") } // Install builds and copies the binary to GOPATH/bin. |
