Skip to content

Commit

Permalink
Use Go 1.22 to build and test (#1562)
Browse files Browse the repository at this point in the history
## Changes

This has been released for a while. Blog post:
https://go.dev/blog/go1.22.

## Tests

None besides the unit tests.
  • Loading branch information
pietern authored Jul 4, 2024
1 parent 324fa2e commit 80136de
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

# No need to download cached dependencies when running gofmt.
cache: false
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

# Github repo: https://github.com/ajv-validator/ajv-cli
- name: Install ajv-cli
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Hide snapshot tag to outsmart GoReleaser
run: git tag -d snapshot || true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x

# Log into the GitHub Container Registry. The goreleaser action will create
# the docker images and push them to the GitHub Container Registry.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/databricks/cli

go 1.21
go 1.22

require (
github.com/Masterminds/semver/v3 v3.2.1 // MIT
Expand Down
5 changes: 2 additions & 3 deletions libs/process/background_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"bytes"
"context"
"fmt"
"os"
"os/exec"
"strings"
"testing"
Expand All @@ -26,8 +25,8 @@ func splitLines(b []byte) (lines []string) {

func TestBackgroundUnwrapsNotFound(t *testing.T) {
ctx := context.Background()
_, err := Background(ctx, []string{"/bin/meeecho", "1"})
assert.ErrorIs(t, err, os.ErrNotExist)
_, err := Background(ctx, []string{"meeecho", "1"})
assert.ErrorIs(t, err, exec.ErrNotFound)
}

func TestBackground(t *testing.T) {
Expand Down

0 comments on commit 80136de

Please sign in to comment.