-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add test-coverage & codecov target and update circleci #109
Conversation
17ccd6f
to
f6fb2a4
Compare
8fc32af
to
c436887
Compare
Looks like it's failing because of missing dep. Do you think we need this in the Makefile, or only the circleci? I think parallel might actually slow it down, because we only get 1 CPU on CI. I'm going to push some changes and you can let me know what you think. |
281e431
to
6334b4d
Compare
@vdemeester I don't think the token would be required (since docker/cli is a public repo), but yes for private repos we'd setup codecov token in circleci. |
f5e6f42
to
a248158
Compare
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
=========================================
Coverage ? 46.16%
=========================================
Files ? 161
Lines ? 10998
Branches ? 0
=========================================
Hits ? 5077
Misses ? 5631
Partials ? 290 |
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.
LGTM
although this now includes some of my changes
We run codecov on PRs against the swarmkit and distribution repositories. I don't have anything against it. But I also can't recall a time when the coverage information has been useful. We've pushed back against PRs that didn't have adequate tests, but that came from reviewing the PR and noticing that the tests were insufficient. I don't think we've ever made the decision based on the cc @stevvooe |
I don't think we have any plans to make it fail CI, I agree that is unreliable. For me the benefit to this integration is that it makes it easier to see the test coverage for a PR. Test coverage may be easy to see in a PR that adds new features, but test coverage in a PR that refactor lots of code is less obvious. The valuable metric to me is patch coverage, not total coverage. |
Signed-off-by: Vincent Demeester <[email protected]>
a248158
to
0019076
Compare
Signed-off-by: Daniel Nephin <[email protected]>
0019076
to
f6d148c
Compare
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.
LGTM
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
go test -tags daemon -v $@ |
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.
Why aren't these just in the Makefile? These kinds of systems are extremely hard to maintain.
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.
What are "these kinds of systems" ? And what makes them hard to maintain?
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.
A mess of bash scripts. It contributes to a horrid build experience and is very hard to modify.
This particular example is absurd. Why is this in its own file?
-covermode=atomic \ | ||
${pkg} | ||
|
||
if test -f profile.out; then |
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.
Please include a comment as to why this required.
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.
Please address this. Why is this not an argument to the original command?
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.
What is "this"? The profile.out
filename?
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.
The file is given as one argument, then copied to the other. Why not give the original file to the command and have it write directly? Are you trying to append it to a global coverage file?
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.
The file isn't copied. The file is appended to the global coverage file yes. That's what it's doing.
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.
LGTM @dnephin's commit 👍
@vdemeester I would hope that you would at least address my comments before merging. This Makefile setup gets a hard REJECT. |
@dnephin @vdemeester can this PR be discussed so that things are addressed or consensus reached? |
Yes, I'm still trying to understand the concerns with this PR. It was important to get it merged so that we have coverage on other PRs. If there are things that need to be changed, we can change them. |
This didn't make it into 17.06 - moving milestone |
…-master-f2123b3fe41e7e126e9c8f4794214a50f71e866b [master] sync to upstream master f2123b3
This is more or less what we used on some other docker project.
test-coverage
should be on his own or be justtest
parellel
here too 👼Signed-off-by: Vincent Demeester [email protected]