mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 07:18:54 +00:00
github: Make the clean commands work
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user