diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cb046b41..4e2549c6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,6 +16,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.63.4 # LINT_VERSION: update version in other places + version: v1.64.5 # LINT_VERSION: update version in other places - id: govulncheck uses: golang/govulncheck-action@v1 diff --git a/Dockerfile b/Dockerfile index 556973c3..68194039 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # GO_VERSION: go version should match version in go.mod file -FROM golang:1.23 as builder +FROM golang:1.24 as builder WORKDIR /workspace COPY go.mod go.mod @@ -18,4 +18,4 @@ WORKDIR / COPY --from=builder /workspace/go-test-coverage . COPY --from=builder /usr/local/go/bin/go /usr/local/go/bin/go ENV PATH="${PATH}:/usr/local/go/bin" -ENTRYPOINT ["/go-test-coverage"] \ No newline at end of file +ENTRYPOINT ["/go-test-coverage"] diff --git a/Makefile b/Makefile index 7d94cb84..2d0bf539 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GO ?= go GOBIN ?= $$($(GO) env GOPATH)/bin GOLANGCI_LINT ?= $(GOBIN)/golangci-lint -GOLANGCI_LINT_VERSION ?= v1.63.4 # LINT_VERSION: update version in other places +GOLANGCI_LINT_VERSION ?= v1.64.5 # LINT_VERSION: update version in other places # Code tidy .PHONY: tidy @@ -20,7 +20,7 @@ lint: get-golangcilint # Runs tests on entire repo .PHONY: test -test: +test: go test -timeout=3s -race -count=10 -failfast -shuffle=on -short ./... go test -timeout=20s -race -count=1 -failfast -shuffle=on ./... -coverprofile=./cover.profile -covermode=atomic -coverpkg=./... @@ -33,4 +33,4 @@ check-coverage: test .PHONY: view-coverage view-coverage: go tool cover -html=cover.profile -o=cover.html - xdg-open cover.html \ No newline at end of file + xdg-open cover.html diff --git a/go.mod b/go.mod index 611039b6..da7597ad 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/vladopajic/go-test-coverage/v2 // GO_VERSION: when changing go version update version in other places -go 1.23 +go 1.24 -toolchain go1.23.4 +toolchain go1.24.0 require ( github.com/alexflint/go-arg v1.4.3 diff --git a/pkg/testcoverage/badgestorer/github_test.go b/pkg/testcoverage/badgestorer/github_test.go index f131b4ed..782cc0c9 100644 --- a/pkg/testcoverage/badgestorer/github_test.go +++ b/pkg/testcoverage/badgestorer/github_test.go @@ -1,7 +1,6 @@ package badgestorer_test import ( - "context" crand "crypto/rand" "encoding/hex" "fmt" @@ -89,7 +88,7 @@ func deleteFile(t *testing.T, cfg Git) { client := github.NewClient(nil).WithAuthToken(cfg.Token) fc, _, _, err := client.Repositories.GetContents( - context.Background(), + t.Context(), cfg.Owner, cfg.Repository, cfg.FileName, @@ -98,7 +97,7 @@ func deleteFile(t *testing.T, cfg Git) { assert.NoError(t, err) _, _, err = client.Repositories.DeleteFile( - context.Background(), + t.Context(), cfg.Owner, cfg.Repository, cfg.FileName,