Consolidate test crates into a single Cargo workspace#4596
Consolidate test crates into a single Cargo workspace#4596pmikolajczyk41 wants to merge 13 commits intomasterfrom
Conversation
❌ 17 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4596 +/- ##
==========================================
+ Coverage 34.20% 34.22% +0.01%
==========================================
Files 494 494
Lines 58926 58926
==========================================
+ Hits 20156 20166 +10
+ Misses 35230 35224 -6
+ Partials 3540 3536 -4 |
KolbyML
left a comment
There was a problem hiding this comment.
This is very nice, are there any reasons we can't use the repo's main workspace Cargo.toml? Regardless this is a massive improvement 😁
theoretically we could, but my main reason was that all these stylus test crates have different target arch: see Also, |
The
crates/stylus/tests/directory contained 13 independent Rust crates, each with its ownCargo.lock,.cargo/config.toml, and an empty[workspace]declaration. This caused duplicated dependency management and one Dependabot PR per crate per dependency update.This PR consolidates them into a single Cargo workspace:
crates/stylus/tests/Cargo.tomlas the workspace root with shared[workspace.dependencies],[workspace.package], and a common[profile.release](with per-package opt-level overrides forerc20,hostio-test,sdk-storage)Cargo.tomls to inherit workspace package fields and use{ workspace = true }dependenciesCargo.lockfiles with a single workspaceCargo.lock.cargo/config.tomlfiles — the workspace-level one atcrates/stylus/tests/.cargo/config.tomlis picked up automatically by Cargo for all memberstimings/Cargo.lock(no correspondingCargo.toml)target/instead of per-cratetarget/directories