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 }} 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 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) }