From c0c948dcd1fd50b10d8dd30f63e4829714a8dcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catt=C4=AB=20Cr=C5=ABd=C4=93l=C4=93s?= <17695588+wzy9607@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:56:12 +0800 Subject: [PATCH] feat(ci): add ci badge --- README.md | 3 +++ hook_test.go | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95386b6..8a6f7d5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # goredisotel +[![ci](https://github.com/wzy9607/goredisotel/actions/workflows/pull-request.yml/badge.svg)](https://github.com/wzy9607/goredisotel/actions/workflows/pull-request.yml) +[![codecov](https://codecov.io/gh/wzy9607/goredisotel/graph/badge.svg?token=VVMWEWOQFO)](https://codecov.io/gh/wzy9607/goredisotel) + A fork of go-redis/extra/redisotel/v9 that follows [Semantic Conventions v1.27](https://github.com/open-telemetry/semantic-conventions/blob/v1.27.0/docs/database/README.md). diff --git a/hook_test.go b/hook_test.go index 62421c3..6ae89ef 100644 --- a/hook_test.go +++ b/hook_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" @@ -15,6 +14,8 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" semconv "go.opentelemetry.io/otel/semconv/v1.27.0" + + "github.com/redis/go-redis/v9" ) type fakeConn struct { @@ -125,6 +126,7 @@ func Test_clientHook_DialHook(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() sr := tracetest.NewSpanRecorder() tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) ch, err := newClientHook(tt.fields.rdsOpt, newConfig(append(tt.fields.opts, WithTracerProvider(tp))...)) @@ -304,6 +306,7 @@ func Test_clientHook_ProcessHook(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() sr := tracetest.NewSpanRecorder() tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) ch, err := newClientHook(tt.fields.rdsOpt, newConfig(append(tt.fields.opts, WithTracerProvider(tp))...))