Skip to content

Commit 18a2afa

Browse files
committed
github: Make the clean commands work
1 parent 0b0c827 commit 18a2afa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎magefile.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package main
44

55
import (
66
"bytes"
7+
"cmp"
78
"fmt"
89
"os"
910
"path"
@@ -154,9 +155,6 @@ func Check() {
154155
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
155156
// causes memory issues in CI.
156157
mg.Deps(TestRace)
157-
if isCI() {
158-
mg.Deps(CleanTest, UninstallAll)
159-
}
160158
}
161159

162160
func testGoFlags() string {
@@ -196,10 +194,12 @@ func TestRace() error {
196194
return err
197195
}
198196
for _, pkg := range pkgs {
197+
if err := cmp.Or(CleanTest(), UninstallAll()); err != nil {
198+
return err
199+
}
199200
if err := runCmd(env, goexe, "test", "-p", "2", "-race", pkg, "-tags", buildTags()); err != nil {
200201
return err
201202
}
202-
mg.Deps(CleanTest, UninstallAll)
203203
}
204204
return nil
205205

0 commit comments

Comments
 (0)