Skip to content

Commit 24210dc

Browse files
committed
github: Remove test binaries after CI test runs
1 parent b037b93 commit 24210dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎magefile.go‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ func Uninstall() error {
6161
return sh.Run(goexe, "clean", "-i", packageName)
6262
}
6363

64+
// Uninstall all installed binaries (including test binaries)
65+
func UninstallAll() error {
66+
return sh.Run(goexe, "clean", "-i", "./...")
67+
}
68+
6469
func flagEnv() map[string]string {
6570
hash, _ := sh.Output("git", "rev-parse", "--short", "HEAD")
6671
return map[string]string{
@@ -143,7 +148,7 @@ func Check() {
143148
if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" {
144149
mg.Deps(Test386)
145150
if isCI() {
146-
mg.Deps(CleanTest)
151+
mg.Deps(CleanTest, UninstallAll)
147152
}
148153
} else {
149154
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
@@ -159,7 +164,7 @@ func Check() {
159164
// causes memory issues in CI.
160165
mg.Deps(TestRace)
161166
if isCI() {
162-
mg.Deps(CleanTest)
167+
mg.Deps(CleanTest, UninstallAll)
163168
}
164169
}
165170

0 commit comments

Comments
 (0)