From f648d479609ef6e9f5eabbb33f559748ca4a664e Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Wed, 8 May 2024 16:07:22 +0900 Subject: [PATCH 1/3] github/workflows: update test workflow Signed-off-by: Koichi Shiraishi --- .github/workflows/{test.yml => test.yaml} | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) rename .github/workflows/{test.yml => test.yaml} (79%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 79% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml index 8ea3574e..44cce89e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yaml @@ -20,13 +20,14 @@ jobs: strategy: matrix: os: - - ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md + - ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md - macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md - - windows-2022 # https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md + - macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md + - windows-2022 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md go-version: - - 1.18.x - - 1.19.x - 1.20.x + - 1.21.x + - 1.22.x neovim-version: - v0.9.1 - nightly @@ -42,12 +43,14 @@ jobs: echo "NVIM_VERSION=$(if [ ${{ matrix.neovim-version }} != 'nightly' ]; then echo 'stable'; else echo 'nightly'; fi)" >> $GITHUB_ENV - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} + check-latest: true + cache-dependency-path: go.mod - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install neovim binary uses: rhysd/action-setup-vim@v1 @@ -63,7 +66,7 @@ jobs: run: | go test -v -race -count=1 -covermode=atomic -coverpkg=./... -coverprofile=coverage.out ./... - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: file: coverage.out flags: ${{ env.OS }}-${{ env.GO_VERSION }}-${{ env.NVIM_VERSION }} From 12646a853989872beecc50a6a78321950c6f204c Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Wed, 8 May 2024 16:34:41 +0900 Subject: [PATCH 2/3] go.mod: update go version to 1.20 Signed-off-by: Koichi Shiraishi --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 9d1159e8..5693cfb2 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/neovim/go-client -go 1.18 +go 1.20 From 3188ef30ee9cae93394649b298924b4f1e15188d Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Wed, 8 May 2024 16:34:54 +0900 Subject: [PATCH 3/3] msgpack/rpc: fix 'append with no values' vet error and for loop range Signed-off-by: Koichi Shiraishi --- msgpack/rpc/rpc_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msgpack/rpc/rpc_test.go b/msgpack/rpc/rpc_test.go index 82c6540a..587aee9f 100644 --- a/msgpack/rpc/rpc_test.go +++ b/msgpack/rpc/rpc_test.go @@ -86,7 +86,7 @@ func TestEndpoint(t *testing.T) { } const n = 10 - for i := 0; i < i; i++ { + for i := 0; i < n; i++ { for j := 0; j < n; j++ { if err := client.Notify("n1", fmt.Sprintf("notif %d,%d", i, j)); err != nil { t.Fatal(err) @@ -109,7 +109,7 @@ func TestArgs(t *testing.T) { defer cleanup() if err := server.Register("n", func(a, b string) ([]string, error) { - return append([]string{a, b}), nil + return []string{a, b}, nil }); err != nil { t.Fatal(err) }