mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 02:32:11 -05:00
github: Try to fix "no space left on device" on MacOS
This commit is contained in:
parent
6bde2a5f88
commit
56d3114199
2 changed files with 14 additions and 2 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.22.x, 1.23.x]
|
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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- if: matrix.os == 'ubuntu-latest'
|
- if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
12
magefile.go
12
magefile.go
|
@ -148,7 +148,11 @@ func Check() {
|
||||||
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
|
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isCi() && isDarwin() {
|
||||||
|
// Skip on macOS in CI (disk space issues)
|
||||||
|
} else {
|
||||||
mg.Deps(Fmt, Vet)
|
mg.Deps(Fmt, Vet)
|
||||||
|
}
|
||||||
|
|
||||||
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
|
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
|
||||||
// causes memory issues in CI.
|
// causes memory issues in CI.
|
||||||
|
@ -239,6 +243,14 @@ func Lint() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isCi() bool {
|
||||||
|
return os.Getenv("CI") != ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func isDarwin() bool {
|
||||||
|
return runtime.GOOS == "darwin"
|
||||||
|
}
|
||||||
|
|
||||||
// Run go vet linter
|
// Run go vet linter
|
||||||
func Vet() error {
|
func Vet() error {
|
||||||
if err := sh.Run(goexe, "vet", "./..."); err != nil {
|
if err := sh.Run(goexe, "vet", "./..."); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue