From 0114b1df40bbda7c5555bafd4278144cce04c778 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Mon, 1 May 2023 19:31:40 -0300 Subject: [PATCH] chore: upgrade to Go v1.20 (#165) --- .github/workflows/lint.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 3 +++ Dockerfile | 2 +- go.mod | 2 +- testfixtures_test.go | 5 ++--- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2033de..4575af3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,11 +14,11 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.20.x - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.46.1 + version: v1.52.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae6810c..e9d2621 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ba4b17..f50aa4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,9 @@ jobs: steps: - name: Install Task uses: arduino/setup-task@v1 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Check out code uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index af02016..6b88056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine +FROM golang:1.20-alpine RUN apk update RUN apk add alpine-sdk diff --git a/go.mod b/go.mod index f4aeec9..b9b7b51 100644 --- a/go.mod +++ b/go.mod @@ -25,4 +25,4 @@ require ( golang.org/x/text v0.7.0 // indirect ) -go 1.18 +go 1.19 diff --git a/testfixtures_test.go b/testfixtures_test.go index f40ba10..b79c7cf 100644 --- a/testfixtures_test.go +++ b/testfixtures_test.go @@ -5,7 +5,6 @@ import ( "database/sql" "embed" "fmt" - "io/ioutil" "os" "testing" "time" @@ -53,7 +52,7 @@ func testLoader(t *testing.T, dialect, connStr, schemaFilePath string, additiona return } - schema, err := ioutil.ReadFile(schemaFilePath) + schema, err := os.ReadFile(schemaFilePath) if err != nil { t.Errorf("cannot read schema file: %v", err) return @@ -447,7 +446,7 @@ func testLoader(t *testing.T, dialect, connStr, schemaFilePath string, additiona }) t.Run("GenerateAndLoad", func(t *testing.T) { - dir, err := ioutil.TempDir(os.TempDir(), "testfixtures_test") + dir, err := os.MkdirTemp(os.TempDir(), "testfixtures_test") if err != nil { t.Errorf("cannot create temp dir: %v", err) return