Skip to content
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

Simplify test coverage collection #2560

Merged

Conversation

PankhudiB
Copy link
Contributor

@PankhudiB PankhudiB commented Oct 13, 2020

Signed-off-by: Pankhudi Bhonsle psbhonsle08@gmail.com

Which problem is this PR solving?

Short description of the changes

  • Replace the old script with go test ./... command

@PankhudiB PankhudiB requested a review from a team as a code owner October 13, 2020 19:45
Signed-off-by: Pankhudi Bhonsle <pankhubh@thoughtworks.com>
Makefile Outdated
@@ -153,7 +153,7 @@ cover: nocover
@echo pre-compiling tests
@time go test -i $(shell go list ./...)
# TODO Switch to single `go test` that already supports multiple packages, but watch out for .nocover dirs.
@./scripts/cover.sh $(shell go list ./...)
go test ./...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not produce code coverage results. Try this:

$(GOTEST) -coverprofile cover.out ./...

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #2560 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2560      +/-   ##
==========================================
+ Coverage   95.30%   95.31%   +0.01%     
==========================================
  Files         208      208              
  Lines        9281     9281              
==========================================
+ Hits         8845     8846       +1     
  Misses        357      357              
+ Partials       79       78       -1     
Impacted Files Coverage Δ
plugin/storage/integration/integration.go 77.34% <0.00%> (-0.56%) ⬇️
cmd/query/app/server.go 90.16% <0.00%> (+1.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 025d2f5...00eb8fd. Read the comment docs.

@yurishkuro yurishkuro changed the title Simplify test coverage script Resolves #797 Simplify test coverage collection Oct 14, 2020
@yurishkuro
Copy link
Member

Resolves #797

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know why it happened, but nice to see coverage go up by 0.02% :-)

Makefile Outdated
@@ -153,7 +153,7 @@ cover: nocover
@echo pre-compiling tests
@time go test -i $(shell go list ./...)
# TODO Switch to single `go test` that already supports multiple packages, but watch out for .nocover dirs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the above 3 lines. Pre-compilation no longer makes sense since we invoke a single go test command anyway, and TODO is done by this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also no longer need nocover

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do need it, it's protection against adding packages that don't have test files, which are not included in coverage by default.

Signed-off-by: Pankhudi Bhonsle <psbhonsle08@gmail.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@yurishkuro yurishkuro merged commit bd59f13 into jaegertracing:master Oct 14, 2020
@PankhudiB
Copy link
Contributor Author

Thank you!

This was my first ever contribution and i did not feel overwhelmed. All thanks to you for your help. :)

@yurishkuro
Copy link
Member

you are welcome, and congrats on the first PR, may it be the first of many.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify test coverage scripts
2 participants