File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : ci
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ pull_request :
7
+ env :
8
+ # Path to where test results will be saved.
9
+ TEST_RESULTS : /tmp/test-results
10
+ # Default version of Go to use by CI workflows. This should be the latest
11
+ # release of Go; developers likely use the latest release in development and
12
+ # we want to catch any bugs (e.g. lint errors, race detection) with this
13
+ # release before they are merged. The Go compatibility guarantees ensure
14
+ # backwards compatibility with the previous two minor releases and we
15
+ # explicitly test our code for these versions so keeping this at prior
16
+ # versions does not add value.
17
+ DEFAULT_GO_VERSION : " 1.21"
18
+
19
+ jobs :
20
+ test-coverage :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Checkout Repo
24
+ uses : actions/checkout@v3
25
+ - name : Setup Environment
26
+ run : |
27
+ echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
28
+ echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
29
+ - name : Install Go
30
+ uses : actions/setup-go@v4
31
+ with :
32
+ go-version : ${{ env.DEFAULT_GO_VERSION }}
33
+ cache-dependency-path : " **/go.sum"
34
+ - name : Run coverage tests
35
+ run : |
36
+ make test-coverage
37
+ - name : Upload coverage reports to codecov
38
+ uses : codecov/codecov-action@v3
39
+ env :
40
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func TestNewOtelHandler(t *testing.T) {
42
42
)
43
43
44
44
handler := NewOtelHandler (loggerProvider , & HandlerOptions {
45
- level : slog .LevelInfo ,
45
+ Level : slog .LevelInfo ,
46
46
}).
47
47
WithAttrs ([]slog.Attr {slog .String ("first" , "value1" )}).
48
48
WithGroup ("group1" ).
You can’t perform that action at this time.
0 commit comments