diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-08-31 18:07:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-08-31 21:05:58 +0200 |
commit | 96afea4acc7ca8cdfce460127b8ae17e303c77c0 (patch) | |
tree | 229e2fd9a16c95083928c6afea95ebb091dafb78 /magefile.go | |
parent | 6d97ee711e834ad4a0d2aca44fafb042008a8429 (diff) | |
download | hugo-96afea4acc7ca8cdfce460127b8ae17e303c77c0.tar.gz hugo-96afea4acc7ca8cdfce460127b8ae17e303c77c0.zip |
github: Try to fix "no space left on device" on MacOS
Diffstat (limited to 'magefile.go')
-rw-r--r-- | magefile.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/magefile.go b/magefile.go index ce2cd41ea..142b9160a 100644 --- a/magefile.go +++ b/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 { |