github: Make the clean commands work

This commit is contained in:
Bjørn Erik Pedersen
2025-11-24 19:04:33 +01:00
parent 0b0c827d5b
commit 18a2afa519
+4 -4
View File
@@ -4,6 +4,7 @@ package main
import (
"bytes"
"cmp"
"fmt"
"os"
"path"
@@ -154,9 +155,6 @@ func Check() {
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
// causes memory issues in CI.
mg.Deps(TestRace)
if isCI() {
mg.Deps(CleanTest, UninstallAll)
}
}
func testGoFlags() string {
@@ -196,10 +194,12 @@ func TestRace() error {
return err
}
for _, pkg := range pkgs {
if err := cmp.Or(CleanTest(), UninstallAll()); err != nil {
return err
}
if err := runCmd(env, goexe, "test", "-p", "2", "-race", pkg, "-tags", buildTags()); err != nil {
return err
}
mg.Deps(CleanTest, UninstallAll)
}
return nil