From fb7f1699e27b2b9533f00b01cf8eac8fce83c361 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 6 May 2026 12:00:20 +0300 Subject: 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 --- Magefile.go | 4 ++-- 1 file 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. -- cgit v1.2.3