Skip to content

Commit

Permalink
#39: Report test coverage to CodeCov (#47)
Browse files Browse the repository at this point in the history
* #39: Report test coverage to CodeCov

* #39: Fixing linting

* #39: linting

* #39 Adding the coverage badge to the readme
  • Loading branch information
roma-glushko authored Dec 30, 2023
1 parent b22b487 commit d4f2d77
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ jobs:

- name: Test
run: go test -v -count=1 -race -shuffle=on -coverprofile=coverage.txt ./...

- name: Test
run: make tests

- name: Upload Coverage
uses: codecov/codecov-action@v3
continue-on-error: true # we don't care if it fails
with:
token: ${{secrets.CODECOV_TOKEN}} # set in repository settings
file: ./coverage.txt # file from the previous step
fail_ci_if_error: false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ glide
tmp
coverage.txt
precommit.txt
pkg/providers/openai/openai_test.go
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</div>

[![LICENSE](https://img.shields.io/github/license/modelgateway/glide.svg?style=flat-square&color=%233f90c8)](https://github.com/modelgateway/glide/blob/main/LICENSE)
[![codecov](https://codecov.io/github/modelgateway/glide/graph/badge.svg?token=F7JT39RHX9)](https://codecov.io/github/modelgateway/glide)

Glide is a cloud-native open source high-performant model gateway. All LLMOps you needed is packed in one lightweight service.

Expand Down
1 change: 1 addition & 0 deletions pkg/providers/openai/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (c *ProviderClient) createChatHTTP(payload *ChatRequest, u *providers.Unifi
}

reqBody := bytes.NewBuffer(payloadBytes)

req, err := http.NewRequest(http.MethodPost, buildURL(defaultEndpoint), reqBody)
if err != nil {
c.Telemetry.Logger.Error(err.Error())
Expand Down

0 comments on commit d4f2d77

Please sign in to comment.