From 0948161529505bd52c82f6a913bbc546bb21bd7f Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Tue, 15 Jul 2025 20:59:57 +0700 Subject: [PATCH] Avoiding Windows runners file locking issue --- cmd/cli/prog_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/cli/prog_test.go b/cmd/cli/prog_test.go index 1fee462..c4ef5c3 100644 --- a/cmd/cli/prog_test.go +++ b/cmd/cli/prog_test.go @@ -1,6 +1,7 @@ package cli import ( + "runtime" "testing" "time" @@ -185,6 +186,10 @@ func Test_shouldUpgrade(t *testing.T) { } func Test_selfUpgradeCheck(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("skipped due to Windows file locking issue on Github Action runners") + } + // Helper function to create a version makeVersion := func(v string) *semver.Version { ver, err := semver.NewVersion(v) @@ -233,6 +238,10 @@ func Test_selfUpgradeCheck(t *testing.T) { } func Test_performUpgrade(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("skipped due to Windows file locking issue on Github Action runners") + } + tests := []struct { name string versionTarget string