Skip to content
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(code): Add Makefile to fix lints and test in local #751

Merged
merged 6 commits into from
Feb 12, 2025

Conversation

hoank101
Copy link
Contributor

Closes: #XXX


PR author checklist

For all contributors

For external contributors

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.67%. Comparing base (99124f5) to head (c21bf4b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #751      +/-   ##
==========================================
- Coverage   81.69%   81.67%   -0.02%     
==========================================
  Files         182      182              
  Lines       16266    16266              
==========================================
- Hits        13287    13284       -3     
- Misses       2979     2982       +3     
Flag Coverage Δ
integration 81.50% <ø> (-0.02%) ⬇️
mbt 8.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core ∅ <ø> (∅)
engine ∅ <ø> (∅)
app ∅ <ø> (∅)
starknet ∅ <ø> (∅)

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated
cd code && cargo clippy --fix --allow-dirty --workspace -- -D warnings

test:
cd code && cargo test
Copy link
Member

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.

Copy link
Member

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:

Copy link
Member

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.

Copy link
Contributor Author

@hoank101 hoank101 Jan 13, 2025

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

Copy link
Member

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.

Makefile Outdated Show resolved Hide resolved
code/crates/starknet/p2p-proto/build.rs Outdated Show resolved Hide resolved
@hoank101 hoank101 requested a review from romac January 13, 2025 14:23
code/Makefile Show resolved Hide resolved
@romac romac added the code Code/implementation related label Jan 30, 2025
@romac romac enabled auto-merge February 12, 2025 08:44
@romac romac added this pull request to the merge queue Feb 12, 2025
@romac romac removed this pull request from the merge queue due to a manual request Feb 12, 2025
@romac romac enabled auto-merge February 12, 2025 08:52
@romac romac changed the title feat: add Makefile to easy fix-lint and test in local feat(code): Add Makefile to fix lints and test in local Feb 12, 2025
@romac romac added this pull request to the merge queue Feb 12, 2025
Merged via the queue into informalsystems:main with commit 56c64fc Feb 12, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code/implementation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants