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
|
# Filter out unnecessary stuff from the coverage report
|
||||||
lcov \
|
lcov \
|
||||||
--rc lcov_branch_coverage=1 \
|
--rc branch_coverage=1 \
|
||||||
--remove lcov.info \
|
--remove lcov.info \
|
||||||
--output-file filtered-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
|
# Generate the filtered summary
|
||||||
lcov \
|
lcov \
|
||||||
--rc lcov_branch_coverage=1 \
|
--rc branch_coverage=1 \
|
||||||
--list filtered-lcov.info
|
--list filtered-lcov.info
|
||||||
|
|
||||||
# Generate the html coverage file
|
# Generate the html coverage file
|
||||||
genhtml \
|
genhtml \
|
||||||
--rc genhtml_branch_coverage=1 \
|
--rc branch_coverage=1 \
|
||||||
--output-directory coverage \
|
--output-directory coverage \
|
||||||
|
--ignore-errors category \
|
||||||
|
--ignore-errors category,category \
|
||||||
filtered-lcov.info
|
filtered-lcov.info
|
||||||
|
|
||||||
echo "Test coverage results successfully generated in the 'coverage' directory"
|
echo "Test coverage results successfully generated in the 'coverage' directory"
|
||||||
|
|
Loading…
Reference in New Issue