Switch from ganachr to foundry-anvil for v4 tests#453
Conversation
Greptile SummaryThis PR migrates the Uniswap v4 test infrastructure from Ganache to Foundry Anvil and wires it into CI as a dedicated matrix slot.
Confidence Score: 5/5The migration is self-contained and the test isolation guards are logically sound; safe to merge. All functional changes — the Anvil fixture, the pytestmark guards, and the foundry-toolchain action — are correct. The stale account-index comment and unconditional ganache/foundry installs are cleanup items that do not affect test correctness or CI reliability. No files require special attention; minor issues are confined to a comment in tests/test_uniswap4.py and the install steps in .github/workflows/test.yml. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Matrix["CI Matrix\nuniswap-version: 1 | 2 | 3 | 4"] --> Job["test job"]
Job --> InstallDeps["Install dependencies\npoetry install + ganache\n(all versions)"]
Job --> InstallFoundry["Install Foundry toolchain\n(all versions)"]
InstallDeps --> TestStep["Test Step: make test"]
InstallFoundry --> TestStep
TestStep --> CheckVersion{UNISWAP_VERSION}
CheckVersion -- "1, 2, or 3" --> SkipV4["Skip test_uniswap4.py"]
CheckVersion -- "4" --> SkipV123["Skip test_uniswap.py + test_cli.py"]
SkipV4 --> GanacheFixture["Ganache fixture port 10999"]
SkipV123 --> AnvilFixture["Anvil fixture port 10998 fork mainnet"]
GanacheFixture --> V123Tests["TestUniswap v1/v2/v3"]
AnvilFixture --> V4Tests["TestUniswap4 v4"]
Reviews (8): Last reviewed commit: "fix" | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev/v4-fin #453 +/- ##
===============================================
+ Coverage 34.40% 52.98% +18.57%
===============================================
Files 12 12
Lines 2241 2229 -12
===============================================
+ Hits 771 1181 +410
+ Misses 1470 1048 -422 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.