fix: make coverage work on newer versions
This commit is contained in:
parent
4e8c30b072
commit
439a0f0337
|
@ -6,20 +6,22 @@ forge coverage --report lcov
|
|||
|
||||
# Filter out unnecessary stuff from the coverage report
|
||||
lcov \
|
||||
--rc lcov_branch_coverage=1 \
|
||||
--rc branch_coverage=1 \
|
||||
--remove lcov.info \
|
||||
--output-file filtered-lcov.info \
|
||||
"*node_modules*" "*mock*" "contracts/libraries/external/*.sol" "contracts/pyth/mock/*"
|
||||
"*node_modules*" "*mock*" "contracts/libraries/external/*.sol" \
|
||||
|
||||
# Generate the filtered summary
|
||||
lcov \
|
||||
--rc lcov_branch_coverage=1 \
|
||||
--rc branch_coverage=1 \
|
||||
--list filtered-lcov.info
|
||||
|
||||
# Generate the html coverage file
|
||||
genhtml \
|
||||
--rc genhtml_branch_coverage=1 \
|
||||
--rc branch_coverage=1 \
|
||||
--output-directory coverage \
|
||||
--ignore-errors category \
|
||||
--ignore-errors category,category \
|
||||
filtered-lcov.info
|
||||
|
||||
echo "Test coverage results successfully generated in the 'coverage' directory"
|
||||
|
|
Loading…
Reference in New Issue