Skip to content

Commit

Permalink
Bump deps (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
dim committed Jun 6, 2022
1 parent ed61972 commit 125b17d
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 57 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
go-version: [1.17.x, 1.18.x]
steps:
- name: Fetch staticcheck
uses: engineerd/configurator@v0.0.6
with:
name: staticcheck
fromGitHubReleases: true
repo: dominikh/go-tools
version: latest
urlTemplate: "https://github.com/dominikh/go-tools/releases/download/2021.1/staticcheck_linux_amd64.tar.gz"
pathInArchive: staticcheck/staticcheck
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Run tests
run: make test
- name: Run staticcheck
run: make staticcheck
- name: Run benchmarks
run: make bench
run: make test bench
golangci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ bench:
bench-race:
go test ./... -run=NONE -bench=. -race

staticcheck:
staticcheck ./...
lint:
golangci-lint run
2 changes: 1 addition & 1 deletion datadog/datadog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/url"
"testing"

"github.com/bsm/ginkgo"
"github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion datadog/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package datadog
import (
"net/http/httptest"

"github.com/bsm/ginkgo"
"github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
"github.com/bsm/instruments"
)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/bsm/instruments

go 1.14
go 1.17

require (
github.com/bsm/ginkgo v1.16.4
github.com/bsm/gomega v1.13.0
github.com/bsm/histogram/v3 v3.0.1
github.com/bsm/ginkgo/v2 v2.1.3
github.com/bsm/gomega v1.18.1
github.com/bsm/histogram/v3 v3.0.2
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/bsm/ginkgo v1.16.4 h1:pkHpo2VJRvI0NGlxCYi8qovww76L7+g82MgM+UBvH4A=
github.com/bsm/ginkgo v1.16.4/go.mod h1:RabIZLzOCPghgHJKUqHZpqrQETA5AnF4aCSIYy5C1bk=
github.com/bsm/gomega v1.13.0 h1:fzOh8E2Wu/x407rP+v3mEb9yGJaMVguiJBtmFkuOmlc=
github.com/bsm/gomega v1.13.0/go.mod h1:JifAceMQ4crZIWYUKrlGcmbN3bqHogVTADMD2ATsbwk=
github.com/bsm/histogram/v3 v3.0.1 h1:A4Mg/ePJrOogj2dPa1JaQCKjFAPtNZ2mKDcdfA5EcBM=
github.com/bsm/histogram/v3 v3.0.1/go.mod h1:sInwPZRh/tt5ypyz+WBfQ0siCZMffhgiFQzvgt2ak40=
github.com/bsm/ginkgo/v2 v2.1.3 h1:Eo/fcrVgq1Dwtj9LsLoPe3ZCb2MoN4jOqzELBsUSj4M=
github.com/bsm/ginkgo/v2 v2.1.3/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
github.com/bsm/gomega v1.18.1 h1:p9jcHR6SQ6pUMt6EptN79kZqzRd/ps6BgNximHW6tdE=
github.com/bsm/gomega v1.18.1/go.mod h1:JifAceMQ4crZIWYUKrlGcmbN3bqHogVTADMD2ATsbwk=
github.com/bsm/histogram/v3 v3.0.2 h1:qCApdlrQkpzA8WKq2jwefpJQur1U4bd38EEV6eIuhiE=
github.com/bsm/histogram/v3 v3.0.2/go.mod h1:V98nemomBkQGgi9Arhz4DTRWoKMtG/j3EpjqrexrWzM=
2 changes: 1 addition & 1 deletion instruments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/bsm/ginkgo"
"github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math"
"time"

"github.com/bsm/ginkgo"
"github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
)

Expand Down
28 changes: 13 additions & 15 deletions util_test.go
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
package instruments

import (
"github.com/bsm/ginkgo"
. "github.com/bsm/ginkgo/extensions/table"
"github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
)

var _ = ginkgo.Describe("MetricID", func() {

DescribeTable("should assemble",
ginkgo.DescribeTable("should assemble",
func(name string, tags []string, x string) {
m := MetricID(name, tags)
Expect(string(m)).To(Equal(x))
},

Entry("", "counter", []string{"a", "b"}, "counter|a,b"),
Entry("", "counter", []string{"b", "a"}, "counter|a,b"),
Entry("", "counter", []string{"x", "z", "y"}, "counter|x,y,z"),
Entry("", "counter", []string{"x", "y", "x"}, "counter|x,y"),
Entry("", "counter", []string{"", "b", "a"}, "counter|a,b"),
Entry("", "counter", nil, "counter"),
Entry("", "counter", []string{}, "counter"),
ginkgo.Entry("", "counter", []string{"a", "b"}, "counter|a,b"),
ginkgo.Entry("", "counter", []string{"b", "a"}, "counter|a,b"),
ginkgo.Entry("", "counter", []string{"x", "z", "y"}, "counter|x,y,z"),
ginkgo.Entry("", "counter", []string{"x", "y", "x"}, "counter|x,y"),
ginkgo.Entry("", "counter", []string{"", "b", "a"}, "counter|a,b"),
ginkgo.Entry("", "counter", nil, "counter"),
ginkgo.Entry("", "counter", []string{}, "counter"),
)

DescribeTable("should split",
ginkgo.DescribeTable("should split",
func(metricID string, xn string, xt []string) {
name, tags := SplitMetricID(metricID)
Expect(name).To(Equal(xn))
Expect(tags).To(Equal(xt))
},

Entry("", "counter|a,b", "counter", []string{"a", "b"}),
Entry("", "|counter|a,b", "|counter", []string{"a", "b"}),
Entry("", "counter", "counter", nil),
ginkgo.Entry("", "counter|a,b", "counter", []string{"a", "b"}),
ginkgo.Entry("", "|counter|a,b", "|counter", []string{"a", "b"}),
ginkgo.Entry("", "counter", "counter", nil),
)
})

0 comments on commit 125b17d

Please sign in to comment.