aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-08-31 18:07:57 +0200
committerBjørn Erik Pedersen <[email protected]>2024-08-31 20:32:44 +0200
commit56d31141995095ad2ba79676df6cddb1924f5cb6 (patch)
tree229e2fd9a16c95083928c6afea95ebb091dafb78
parent6bde2a5f881a523f170348a5ceb1281ebf26ae80 (diff)
downloadhugo-56d31141995095ad2ba79676df6cddb1924f5cb6.tar.gz
hugo-56d31141995095ad2ba79676df6cddb1924f5cb6.zip
github: Try to fix "no space left on device" on MacOStexthtml
-rw-r--r--.github/workflows/test.yml2
-rw-r--r--magefile.go14
2 files changed, 14 insertions, 2 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 120262098..b513863c5 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
- os: [ubuntu-latest, macos-latest, windows-latest]
+ os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
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 {