From f78162ba68684784601416205909747860b1b8ab Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Mon, 2 Dec 2024 18:20:57 -0800 Subject: [PATCH] Update module to v2 and test newer versions of Go --- .github/workflows/gotest.yaml | 41 ++++++++++++++++++++++++++--------- examples/example_test.go | 2 +- go.mod | 2 +- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gotest.yaml b/.github/workflows/gotest.yaml index a0cb2fd..b6e861b 100644 --- a/.github/workflows/gotest.yaml +++ b/.github/workflows/gotest.yaml @@ -1,19 +1,40 @@ -name: gotest +name: Go Test -on: [pull_request] +on: + push: + branches: + - master + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + pull_request: + branches: + - master jobs: gotest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - goVer: [1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19] + go-version: [ + # "1.14", + # "1.15", + # "1.16", + "1.17", + "1.18", + "1.19", + "1.20", + "1.21", + oldstable, + stable, + ] steps: - - name: Set up Go ${{ matrix.goVer }} - uses: actions/setup-go@v1 + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Golang Environment + uses: actions/setup-go@v5 with: - go-version: ${{ matrix.goVer }} - - name: Check out source - uses: actions/checkout@v1 + go-version: ${{ matrix.go-version }} + - name: Test - run: go test -v -cover -race ./... + run: go test -v -cover -race -shuffle=on ./... diff --git a/examples/example_test.go b/examples/example_test.go index 18c6393..841c6cb 100644 --- a/examples/example_test.go +++ b/examples/example_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/opentracing-contrib/go-gin/ginhttp" + "github.com/opentracing-contrib/go-gin/v2/ginhttp" opentracing "github.com/opentracing/opentracing-go" jaeger "github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go/zipkin" diff --git a/go.mod b/go.mod index 98f1381..2e32908 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/opentracing-contrib/go-gin +module github.com/opentracing-contrib/go-gin/v2 go 1.14