Skip to content

Commit

Permalink
chore: added ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Nekrasov committed Feb 12, 2024
1 parent ff4dcb1 commit 4114bd7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci
on:
push:
branches:
- main
pull_request:
env:
# Path to where test results will be saved.
TEST_RESULTS: /tmp/test-results
# Default version of Go to use by CI workflows. This should be the latest
# release of Go; developers likely use the latest release in development and
# we want to catch any bugs (e.g. lint errors, race detection) with this
# release before they are merged. The Go compatibility guarantees ensure
# backwards compatibility with the previous two minor releases and we
# explicitly test our code for these versions so keeping this at prior
# versions does not add value.
DEFAULT_GO_VERSION: "1.21"

jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
cache-dependency-path: "**/go.sum"
- name: Run coverage tests
run: |
make test-coverage
- name: Upload coverage reports to codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion otelslog/otel_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestNewOtelHandler(t *testing.T) {
)

handler := NewOtelHandler(loggerProvider, &HandlerOptions{
level: slog.LevelInfo,
Level: slog.LevelInfo,
}).
WithAttrs([]slog.Attr{slog.String("first", "value1")}).
WithGroup("group1").
Expand Down

0 comments on commit 4114bd7

Please sign in to comment.