From 5ba743afea31cfa479205e63a25b816897211d74 Mon Sep 17 00:00:00 2001 From: Ambrose Chua <132422979+microsec-ambrose@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:50:09 +0800 Subject: [PATCH] chore(deps): bump minimum Go version to 1.21 --- .github/workflows/go.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- go.mod | 4 +++- pkg/loader/compose/compose_test.go | 6 +++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fdff02c4..18acebc1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v5 with: - go-version: ^1.19 + go-version: ^1.21 id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bb9593dd..79326f11 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ jobs: lint: strategy: matrix: - go: [1.18, 1.19] + go: [1.21, 1.22] name: lint runs-on: ubuntu-latest steps: @@ -16,4 +16,4 @@ jobs: with: go-version: ${{ matrix.go }} - name: "Run go vet" - run: "go vet ./pkg/..." \ No newline at end of file + run: "go vet ./pkg/..." diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f34ac1a..e178aaf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [1.18, 1.19] + go: [1.21, 1.22] cross_compile: [true, false] steps: - uses: actions/checkout@v4 @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.19 + go-version: ^1.21 - name: Install dyff run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8 - name: Create .coverprofile for each targeted directory by re:running tests diff --git a/go.mod b/go.mod index 8526845a..b93508fe 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/kubernetes/kompose -go 1.18 +go 1.21 + +toolchain go1.21.8 require ( github.com/compose-spec/compose-go/v2 v2.0.0-rc.8 diff --git a/pkg/loader/compose/compose_test.go b/pkg/loader/compose/compose_test.go index ec200244..babe48cf 100644 --- a/pkg/loader/compose/compose_test.go +++ b/pkg/loader/compose/compose_test.go @@ -441,7 +441,7 @@ func TestUnsupportedKeys(t *testing.T) { }, }, Services: types.Services{ - types.ServiceConfig{ + "foo": types.ServiceConfig{ Name: "foo", Image: "foo/bar", Build: &types.BuildConfig{ @@ -453,7 +453,7 @@ func TestUnsupportedKeys(t *testing.T) { "net1": {}, }, }, - types.ServiceConfig{ + "bar": types.ServiceConfig{ Name: "bar", Image: "bar/foo", Build: &types.BuildConfig{ @@ -476,7 +476,7 @@ func TestUnsupportedKeys(t *testing.T) { projectWithDefaultNetwork := &types.Project{ Services: types.Services{ - types.ServiceConfig{ + "foo": types.ServiceConfig{ Networks: map[string]*types.ServiceNetworkConfig{ "default": {}, },