-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: add Makefile to easy fix-lint and test in local #751
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #751 +/- ##
==========================================
- Coverage 79.28% 75.53% -3.76%
==========================================
Files 104 165 +61
Lines 9026 14301 +5275
==========================================
+ Hits 7156 10801 +3645
- Misses 1870 3500 +1630
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Makefile
Outdated
cd code && cargo clippy --fix --allow-dirty --workspace -- -D warnings | ||
|
||
test: | ||
cd code && cargo test |
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.
For running unit tests, I would advise using https://nexte.st as it's a much more capable test runner than the builtin test command.
For integration tests, we use cargo-maelstrom
to isolate each test and run them in parallel.
So let's perhaps add two targets: integration-tests
and unit-tests
and combine them under test
.
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.
See the corresponding GitHub Action workflows for more details:
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 will update the CONTRIBUTING.md file accordingly to better surface this information.
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 updated, but will add integration-tests, currently cargo-maelstrom
don't work well on MacOs
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.
Ah right, then we can instead use cargo nextest -p informalsystems-malachitebft-starknet-test --no-capture
which works on all platforms.
@@ -16,6 +16,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | |||
config.bytes(["."]); | |||
config.enable_type_names(); | |||
config.default_package_filename("p2p"); | |||
config.disable_comments(["."]); // This will disable doc comments generation |
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 is this needed? Have you seen issues with the generated doc comments?
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 added because have warning
warning: first doc comment paragraph is too long
--> /Users/xx/resource/malachite/code/target/debug/build/informalsystems-malachitebft-starknet-p2p-proto-5e678345c56c8f38/out/p2p.rs:1295:1
|
1295 | / /// Finalize the Tendermint Proposal. When a validator receives this message it will presume that no
1296 | | /// more content for the proposal should be sent. The signature supplied with ProposalFin should be
1297 | | /// for the full Tendermint proposal:
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.
How do you get this warning? With rustfmt or clippy?
Closes: #XXX
PR author checklist
For all contributors
For external contributors