-
Notifications
You must be signed in to change notification settings - Fork 252
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
fix: test packages and coverage generation #966
fix: test packages and coverage generation #966
Conversation
rahulghangas
commented
Nov 7, 2022
•
edited
edited
- Closes Fix test coverage script #924
Codecov Report
@@ Coverage Diff @@
## main #966 +/- ##
===========================================
+ Coverage 27.08% 51.09% +24.00%
===========================================
Files 81 71 -10
Lines 9067 4378 -4689
===========================================
- Hits 2456 2237 -219
+ Misses 6375 1915 -4460
+ Partials 236 226 -10 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
[blocking][question] sorry for the naive question but how do we know that code coverage is fixed with this PR? Is there a PR on your fork that demonstrates what the comment for coverage looks like after this PR is merged?
#966 (comment) doesn't appear exhaustive of all packages in this repo.
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.
Thanks a lot for taking care of this 👍 👍
I left a blocking comment, but since I am not very familiar with uploading test coverage, I might be wrong :D
@rootulp https://app.codecov.io/github/celestiaorg/celestia-app/tree/chore%2Ffix-coverage #966 (comment) was generated by the buggy script, was resolved in a later commit |
…ng relevant files
85349d5
to
7fd3cca
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.
[blocking]
Code coverage on main: https://app.codecov.io/github/celestiaorg/celestia-app/tree/main/ has 8199 lines covered
Code coverage on this branch: https://app.codecov.io/github/celestiaorg/celestia-app/tree/chore%2Ffix-coverage/ has 4845 lines covered
Why does this branch have fewer lines covered? Can it be rebased on top of current main to see what the difference is? If this PR fixes the issue, I would expect more lines to be covered, not less.
.github/workflows/test.yml
Outdated
excludelist="$(find . -type f -name '*.go' | xargs grep -l 'DONTCOVER')\n" | ||
excludelist+="$(find . -type f -name '*.pb.*')\n" | ||
excludelist+="$(find . -type f -path './tests/mocks/*.go')" | ||
for filename in ${excludelist}; do | ||
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') |
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.
it's not clear to me what the fix is. Can you please elaborate in the PR description or a code comment?
@rootulp If I understand right:
Probably, because the proto generated files are not included. |
from the exclude list so I'd expect more proto files to be included in the coverage.txt |
@rootulp I guess it's these files that are excluded:
As per:
Or, I am missing something |
It looks like before and after this PR,
Fewer No |
I don't get why it's picking up those files, or why changing it would help since the command above returns all the |
d913892
to
012c034
Compare
012c034
to
a1e4444
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 utACK
thx for this @rahulghangas !
How do I go about triggering a code coverage report generation? |
If I understand right, codecov will automatically push a comment if there were some changes, for the first time the PR is open. Then, it will start updating the comment, it posted the first time, every time a commit does a change to the patterns:
However, we can always access the coverage from here: https://app.codecov.io/github/celestiaorg/celestia-app/tree/chore%2Ffix-coverage/ To trigger a new coverage report, changes need to be done to the above files. Probably, a dummy commit and revert would do the job. Or, someone with admin access (don't know which permissions they need to have). |
7f0b9b6
to
9333cea
Compare
9333cea
to
d68780d
Compare
This reverts commit d68780d.
https://app.codecov.io/github/celestiaorg/celestia-app/tree/chore%2Ffix-coverage/ ps - I hate bash! |
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.
@rahulghangas Thanks a lot for handling this 👍 👍 🎉 🎉