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

ci: update codecov to use Foundry #231

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tsconfig.tsbuildinfo
# Coverage
coverage
coverage.json
lcov.info

# Slither
scripts/slither-results/*
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
src = 'contracts'
src = 'contracts/prototypes'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having the following error for coverage without it

node_modules/@uniswap/v2-periphery/contracts/UniswapV2Router02.sol:12:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract UniswapV2Router02 is IUniswapV2Router02 {
^ (Relevant source part starts here and spans across multiple lines).
Analysing contracts...
Error:
inline assembly block with no AST attribute
error Command failed with exit code 1.

But I think it makes sense anyway since we only use new contracts for Foundry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i think this should be fine

out = 'out'
libs = ['node_modules', 'lib']
test = 'testFoundry'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"scripts": {
"build": "yarn compile && npx del-cli dist abi && npx tsc || true && npx del-cli './dist/typechain-types/**/*.js' && npx cpx './data/**/*' dist/data && npx cpx './artifacts/contracts/**/*' ./abi && npx del-cli './abi/**/*.dbg.json'",
"compile": "npx hardhat compile --force",
"coverage": "npx hardhat coverage --temp ./coverage-artifacts",
"coverage": "forge clean && forge coverage --report lcov",
"docs": "forge doc",
"generate": "yarn compile && ./scripts/generate_go.sh || true && ./scripts/generate_addresses.sh && yarn lint:fix",
"lint": "npx eslint . --ext .js,.ts --ignore-pattern lib/",
Expand Down
Loading