mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
github: Try to fix "no space left on device" on MacOS
This commit is contained in:
14
magefile.go
14
magefile.go
@@ -148,7 +148,11 @@ func Check() {
|
||||
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
|
||||
}
|
||||
|
||||
mg.Deps(Fmt, Vet)
|
||||
if isCi() && isDarwin() {
|
||||
// Skip on macOS in CI (disk space issues)
|
||||
} else {
|
||||
mg.Deps(Fmt, Vet)
|
||||
}
|
||||
|
||||
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
|
||||
// causes memory issues in CI.
|
||||
@@ -239,6 +243,14 @@ func Lint() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func isCi() bool {
|
||||
return os.Getenv("CI") != ""
|
||||
}
|
||||
|
||||
func isDarwin() bool {
|
||||
return runtime.GOOS == "darwin"
|
||||
}
|
||||
|
||||
// Run go vet linter
|
||||
func Vet() error {
|
||||
if err := sh.Run(goexe, "vet", "./..."); err != nil {
|
||||
|
Reference in New Issue
Block a user