-
Notifications
You must be signed in to change notification settings - Fork 8
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
github-actions: add codecov upload #1
base: master
Are you sure you want to change the base?
Conversation
938c854
to
2be5a27
Compare
2be5a27
to
d59e4e8
Compare
Rebased to current master and squashed comments |
Codecov Report
|
Maybe try with a new version of the codecov action. On riot-generator, the version is 1.0.7. |
I have the feeling this might be because it is not in the master branch :-/. |
From the PR's report
|
I deactivated branch protection and directly pushed to master to test my hypothesis. Will clean-up after. |
(pushing to a test branch did not work as that branch then is ignored by Github Actions) |
d6a343e
to
4b57c84
Compare
56c64cf
to
96642be
Compare
It's an issue with the |
da5cfef
to
fde0768
Compare
e4feb0d
to
eb339aa
Compare
Still doesn't work :( |
147e9a4
to
82349b8
Compare
Let's give this another chance |
82349b8
to
2381524
Compare
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
============================================
+ Coverage 80.66% 100.00% +19.33%
============================================
Files 9 2 -7
Lines 269 60 -209
Branches 0 4 +4
============================================
- Hits 217 60 -157
+ Misses 52 0 -52
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
That seemed to have triggered something. At least now it does not insist on measuring the coverage of the tests and nothing of the module. ^^ |
e7aae72
to
413badb
Compare
Rebased and squashed to current master. |
413badb
to
7614f30
Compare
Again. |
How to I verify this is working? |
Appearently it is not working at all, atm, see current build status. Also, I am not sure how @aabadie's recent tox rework factors into this... :-/ |
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
===========================================
+ Coverage 80.66% 95.95% +15.28%
===========================================
Files 9 4 -5
Lines 269 173 -96
Branches 0 11 +11
===========================================
- Hits 217 166 -51
+ Misses 52 6 -46
- Partials 0 1 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
That's exactly as I feared: Now it is only showing the coverage results of |
Normally codecov is supposed to merge results from different testenv (that's one of it's strength). |
But only if you use |
github-actions: run `rapidjson` testenv separately To append coverage results.
setup.cfg
Outdated
raise NotImplementedError | ||
return NotImplemented |
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 do need to add these lines ? In theory, these kind of things could be tested.
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 do need to add these lines ? In theory, these kind of things could be tested.
I was called Mrs "100% percent coverage" by @MrKevinWeiss before, but even I don't test code that states on its own that it is not implemented ;-).
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.
I think this is a bit out of scope of this PR anyway. And I think, this only concerns
Line 237 in ee12bb5
raise NotImplementedError |
The "raise NotImplementedError" is useless since it's an abstract method, you could just replace it with
...
. When instanciating a concrete class that doesn't implement the get_ctrl
method, python will raise a TypeError exception telling what method is missing.
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.
To summarize, I think this whole configuration block should be removed.
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.
I think this is a bit out of scope of this PR anyway. And I think, this only concerns
Line 237 in ee12bb5
raise NotImplementedError
But then get a missing coverage there....
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.
then get a missing coverage there...
Then just replace this line with ... # pragma: no cover
If you want to ensure a derived class cannot be instanciated without a proper implementation of the get_ctrl
method, you can use this test:
def test_not_implemented_factory():
class MyFactory(riotctrl.ctrl.RIOTCtrlFactoryBase):
pass
with pytest.raises(TypeError) as exc_info:
_ = MyFactory()
assert exc_info.value.args[0] == (
"Can't instantiate abstract class MyFactory "
"with abstract method get_ctrl"
)
but you definitely don't need to add an exclude_lines
config in setup.cfg.
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.
Fine... let's finally get this in and worry about actual coverage later...
This adds an upload of the coverage report to codecov. This way, we can track if a PR increases or decreases test coverage.
Requires #2 to be mergable into protected branch 😅