-
Notifications
You must be signed in to change notification settings - Fork 83
Add test coverage to test-unit Makefile target #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,16 @@ jobs: | |
run: | | ||
make test | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 | ||
with: | ||
fail_ci_if_error: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's considered an error for coverage? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For example, if there is an issue with uploading the coverage file (e.g., network issues, invalid file paths, or errors with the Codecov service), the CI process will be marked as failed. This is helpful in environments where you want to ensure that coverage reports are always successfully uploaded to Codeco |
||
files: go-test-coverage.out | ||
name: codecov-llm-d-inference-scheduler | ||
verbose: true | ||
# https://github.com/codecov/codecov-action/issues/1594#issuecomment-2394913029 | ||
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} | ||
|
||
- name: Run make build | ||
shell: bash | ||
run: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ test: test-unit | |
.PHONY: test-unit | ||
test-unit: download-tokenizer download-zmq | ||
@printf "\033[33;1m==== Running Unit Tests ====\033[0m\n" | ||
go test -ldflags="$(LDFLAGS)" -v ./... | ||
go test -ldflags="$(LDFLAGS)" -v -covermode=atomic -coverprofile=go-test-coverage.out ./... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we go with and pay the runtime penalty for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will do |
||
|
||
.PHONY: test-integration | ||
test-integration: download-tokenizer download-zmq | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason we can't use a tagged release instead of a SHA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No special reason. I copied it from the project envoyproxy/ai-gateway: https://github.com/envoyproxy/ai-gateway/blob/main/.github/workflows/build_and_test.yaml#L70-L82