Skip to content

Commit

Permalink
test: coverage scripts added
Browse files Browse the repository at this point in the history
  • Loading branch information
vicnaum committed Jan 11, 2025
1 parent 8198261 commit e6ed308
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ dist
deployment-zk/*
!deployment-zk/lensSepoliaTestnet/
cache_forge/solidity-files-cache.json

lcov.info
4 changes: 4 additions & 0 deletions coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rm -fr coverage lcov.info
mkdir -p coverage
forge coverage --report lcov
genhtml --ignore-errors inconsistent --ignore-errors corrupt --ignore-errors category --rc derive_function_end_line=0 lcov.info -o coverage/html --branch-coverage >/dev/null 2>&1 || { echo "Error generating coverage report"; exit 1; }
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"compile": "hardhat compile",
"clean": "hardhat clean",
"test": "hardhat test --network hardhat",
"coverage": "forge coverage",
"coverage:report": "bash coverage.sh",
"prepare": "husky",
"format": "forge fmt",
"prod:abis": "npm run abis && cp -r out/abis ./ABIs",
Expand Down

0 comments on commit e6ed308

Please sign in to comment.