From 53fb8caad4bf683e50b5ee73e6bb1fbaafafd314 Mon Sep 17 00:00:00 2001 From: shirou Date: Sat, 24 Feb 2024 01:25:24 +0000 Subject: [PATCH] [darwin][ci]: skip frequency check on GitHub Action --- cpu/cpu_darwin_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu/cpu_darwin_test.go b/cpu/cpu_darwin_test.go index 57b3d66ee..a95862369 100644 --- a/cpu/cpu_darwin_test.go +++ b/cpu/cpu_darwin_test.go @@ -4,6 +4,7 @@ package cpu import ( + "os" "testing" "github.com/shoenig/go-m1cpu" @@ -23,7 +24,7 @@ func Test_CpuInfo_AppleSilicon(t *testing.T) { if vv.ModelName == "" { t.Errorf("could not get CPU info: %v", vv) } - if vv.Mhz <= 0 { + if vv.Mhz <= 0 && os.Getenv("CI") != "true" { t.Errorf("could not get frequency of: %s", vv.ModelName) } if vv.Mhz > 6000 {