-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Set up code coverage properly #740
Conversation
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
still not getting all the results i want because some ignored tests are not running Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #740 +/- ##
=========================================
Coverage ? 60.34%
=========================================
Files ? 52
Lines ? 3051
Branches ? 0
=========================================
Hits ? 1841
Misses ? 1210
Partials ? 0 Continue to review full report at Codecov.
|
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Can run |
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Managed to get ignored lib tests to run using a |
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
A few more percent, at a respectable 60 now. Going to leave it now, don't want to mess more until there's a base report and we see how the reports come in from the bot as PRs come in. A cool feature of this is that it doesn't make new comments, it just updates the existing comment. |
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
I am just going to assume that this is uncontroversial and merge this for now. If the coverage message gets annoying, we can remove the pr/push build, but need to test after merging so we have a baseline. |
Getting it from 45% to 55% then 60% by running some of the ignored lib tests in
k3d
on github actions and then porting a few example basics into ignored tests. Also moved from coveralls to codecov since it seems more modern (and was easy to plumb with the action).We should have a higher coverage than what it shows if we account for examples, but we need to either add an extra coverage run for examples (it is very slow with building all), or port some example tests into kube (like what I did for
crd_api
anddynamic_api
here).Ultimately, what's shown here is a tradeoff. Doc tests are slow, seems to require nightly. Example tests are slow because we need to build and run all of them sequentially. It's probably better to focus on coverage the traditional way with some core tests in
kube
or the relevant crates.It doesn't seem to count
kube-derive
properly. Maybe it's possible to tweak the command to get that in. See config "reference"Commands to replicate what is running here (minus output format) is:
with
cargo-tarpaulin 0.18.5
and the new embeddedtarpaulin.toml
to encapsulate flags (needed a lot of tweaks to get the ignored, feature-dependent tests in kube/src/lib to run).For now this is at least enough to satisfy the "most code is covered" requirement from #737.