From: Bjørn Erik Pedersen Date: Fri, 21 Nov 2025 08:49:26 +0000 (+0100) Subject: github: Remove test binaries after CI test runs X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=24210dcad9d5bc0556f36eddeed30e284b987017;p=brevno-suite%2Fhugo github: Remove test binaries after CI test runs --- diff --git a/magefile.go b/magefile.go index 3e2268b52..0a92ca86d 100644 --- a/magefile.go +++ b/magefile.go @@ -61,6 +61,11 @@ func Uninstall() error { return sh.Run(goexe, "clean", "-i", packageName) } +// Uninstall all installed binaries (including test binaries) +func UninstallAll() error { + return sh.Run(goexe, "clean", "-i", "./...") +} + func flagEnv() map[string]string { hash, _ := sh.Output("git", "rev-parse", "--short", "HEAD") return map[string]string{ @@ -143,7 +148,7 @@ func Check() { if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" { mg.Deps(Test386) if isCI() { - mg.Deps(CleanTest) + mg.Deps(CleanTest, UninstallAll) } } else { fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS) @@ -159,7 +164,7 @@ func Check() { // causes memory issues in CI. mg.Deps(TestRace) if isCI() { - mg.Deps(CleanTest) + mg.Deps(CleanTest, UninstallAll) } }