diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9af58ec53..bc89c4906 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,11 +20,11 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.50 + version: v1.51 only-new-issues: true timeout-minutes: 10 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a8c62c22..1af9d9c79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: run: make vet - name: Check go.mod Tidiness run: make mod-tidy - if: ${{ matrix.go == '1.19' }} + if: ${{ matrix.go == '1.20' }} - name: Test run: make test - name: Test (with race detection) @@ -56,7 +56,7 @@ jobs: # pull requests, only run this step for a single job in the matrix. For # all other workflow triggers (e.g., pushes to a release branch) run # this step for the whole matrix. - if: ${{ github.event_name != 'pull_request' || (matrix.go == '1.19' && matrix.os == 'ubuntu') }} + if: ${{ github.event_name != 'pull_request' || (matrix.go == '1.20' && matrix.os == 'ubuntu') }} - name: Collect coverage run: make test-coverage - name: Upload coverage to Codecov @@ -66,7 +66,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - go: ["1.19", "1.18", "1.17"] + go: ["1.20", "1.19", "1.18"] os: [ubuntu, windows, macos] fail-fast: false # Test the GOPATH mode with the oldest Go version we support @@ -86,7 +86,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.17" + go-version: "1.18" - uses: actions/checkout@v3 with: path: ${{ env.WORKDIR }} diff --git a/Makefile b/Makefile index 5d3f8150e..294a5470c 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ mod-tidy: ## Check go.mod tidiness for dir in $(ALL_GO_MOD_DIRS); do \ cd "$${dir}"; \ echo ">>> Running 'go mod tidy' for module: $${dir}"; \ - go mod tidy -go=1.19 -compat=1.17; \ + go mod tidy -go=1.18 -compat=1.18; \ done; \ git diff --exit-code; .PHONY: mod-tidy diff --git a/go.mod b/go.mod index 5d3157226..5ce431802 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/getsentry/sentry-go -go 1.19 +go 1.18 require ( github.com/gin-gonic/gin v1.8.1 diff --git a/otel/go.mod b/otel/go.mod index 93e36a749..b86324330 100644 --- a/otel/go.mod +++ b/otel/go.mod @@ -1,6 +1,6 @@ module github.com/getsentry/sentry-go/otel -go 1.19 +go 1.18 require ( github.com/getsentry/sentry-go v0.18.0 diff --git a/otel/internal/dummy/dummy.go b/otel/internal/dummy/dummy.go deleted file mode 100644 index 41d1a5415..000000000 --- a/otel/internal/dummy/dummy.go +++ /dev/null @@ -1,9 +0,0 @@ -package dummy - -// This package is intentionally left empty. -// Reason: the otel module currenty requires go>=1.18. All files in the module have '//go:build go1.18' guards, so -// with go1.17 "go test" might fail with the error: "go: warning: "./..." matched no packages; no packages to test". -// As a workaround, we added this empty "dummy" package, which is the only package without the compiler version restrictions, -// so at least the compiler doesn't complain that there are no packages to test. -// -// This file and package can be removed when we drop support for 1.17.