Skip to content

Commit 737d719

Browse files
committed
fix: test coverage script
1 parent 85ba557 commit 737d719

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

contracts/.solcover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const shell = require("shelljs");
66

77
module.exports = {
88
istanbulReporter: ["lcov"],
9+
configureYulOptimizer: true,
910
onCompileComplete: async function (_config) {
1011
await run("typechain");
1112
},

contracts/scripts/coverage.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,23 @@ mkdir -p coverage
88
# Generate the Forge coverage report
99
forge clean
1010
if [ "$CI" != "true" ]; then
11+
echo "Building contracts with Forge..."
12+
forge build
13+
echo "Running Forge coverage..."
1114
forge coverage --report summary --report lcov --report-file coverage/lcov-forge.info
15+
echo "Forge coverage report generated"
1216
else
1317
# FIXME: Temporarily workaround a CI issue
1418
touch coverage/lcov-forge.info
1519
fi
1620

1721
# Generate the Hardhat coverage report
1822
yarn clean
23+
echo "Building contracts with Hardhat..."
24+
yarn build
25+
echo "Running Hardhat coverage..."
1926
yarn hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --show-stack-traces --testfiles "test/**/*.ts"
27+
echo "Hardhat coverage report generated"
2028
mv coverage/lcov.info coverage/lcov-hardhat.info
2129

2230
# Make the Hardhat report paths relative for consistency with Forge coverage report

0 commit comments

Comments
 (0)