-
Notifications
You must be signed in to change notification settings - Fork 1
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
NEXT-37303 - Add coverage to CI #14
Conversation
6ee25af
to
8099cad
Compare
de5061d
to
3be797c
Compare
587c335
to
ec073e3
Compare
ec073e3
to
0168007
Compare
ToDo: increase coverage + code cleanup |
0168007
to
0677846
Compare
0677846
to
44a7c36
Compare
44a7c36
to
3a55c78
Compare
3a55c78
to
05e2448
Compare
3be698f
to
2c64fce
Compare
2c64fce
to
17fbd66
Compare
Summary of the total line code coverage for the whole codebase
Summary of each file (click to expand)
More details (click to expand)Download full HTML reportYou can download the full HTML report here: click to download You can also generate these reports locallyFor that, you need to install cargo-llvm-cov, then you can run: cargo llvm-cov --all-features --no-fail-fast --open Hint: There are also other ways to see code coverage in Rust. For example with RustRover, you can execute tests with coverage generation directly in the IDE. RememberYour tests should be meaningful and not just be written to raise the coverage. |
Let's get these changes merged for now. I will keep the ticket still in progress and do a follow up PR with further tests 🙂 . But before writing further tests I want to experiment with a bigger refactor: I want to try removing
|
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 💪
Especially the type conversion during deserialization, has already caused issues with the default profiles for me 😅
17fbd66
to
7fb15e1
Compare
Summary of the total line code coverage for the whole codebase
Summary of each file (click to expand)
More details (click to expand)Download full HTML reportYou can download the full HTML report here: click to download You can also generate these reports locallyFor that, you need to install cargo-llvm-cov, then you can run: cargo llvm-cov --all-features --no-fail-fast --open Hint: There are also other ways to see code coverage in Rust. For example with RustRover, you can execute tests with coverage generation directly in the IDE. RememberYour tests should be meaningful and not just be written to raise the coverage. |
"limit": null, | ||
"page": 1 | ||
} | ||
"media": {} |
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.
@LarsKemper after rebasing I cleaned up the criteria serialization a bit more:
- to not include
"limit": null
, because why send that data to the server - to not include
"page": 1
, because that should also be the default on the server side
So we're back to empty objects in the request if there is no criteria for an association 🎉
I also found a small issue that the clippy CI pipeline wasn't failing on warnings (it's a really nice linter and reported a useful warning on your last PR, see https://github.com/shopware/sw-sync-cli/actions/runs/10211517905/job/28253002414#step:5:12 🙈 )
7fb15e1
to
3360b5a
Compare
Summary of the total line code coverage for the whole codebase
Summary of each file (click to expand)
More details (click to expand)Download full HTML reportYou can download the full HTML report here: click to download You can also generate these reports locallyFor that, you need to install cargo-llvm-cov, then you can run: cargo llvm-cov --all-features --no-fail-fast --open Hint: There are also other ways to see code coverage in Rust. For example with RustRover, you can execute tests with coverage generation directly in the IDE. RememberYour tests should be meaningful and not just be written to raise the coverage. |
Adds coverage reporting to the CI
Unfortunately GitHub is not able to display covered lines in the diff viewer, unlike GitLab. So Instead I came up with the following solution:
Increases the coverage and code cleanup
Additionally I did some code cleanup + written more tests for the already existing code.