The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hyperlane-monorepo/solidity/coverage.sh

28 lines
746 B

#!/bin/bash
# generates lcov.info
forge coverage \
--report lcov \
--no-match-test testFork \
--ir-minimum # https://github.com/foundry-rs/foundry/issues/3357
if ! command -v lcov &>/dev/null; then
echo "lcov is not installed. Installing..."
sudo apt-get install lcov
fi
lcov --version
# exclude FastTokenRouter until https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2806
EXCLUDE="*test* *mock* *node_modules* *FastHyp*"
lcov \
--rc lcov_branch_coverage=1 \
--remove lcov.info $EXCLUDE \
--output-file forge-pruned-lcov.info \
if [ "$CI" != "true" ]; then
genhtml forge-pruned-lcov.info \
--rc lcov_branch_coverage=1 \
--output-directory coverage
open coverage/index.html
fi