Files
openzeppelin-contracts/scripts/checks/coverage.sh
cairo ccc110360f Add Foundry tests to coverage (#5098)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2024-06-29 18:24:18 +02:00

19 lines
349 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
export COVERAGE=true
export FOUNDRY_FUZZ_RUNS=10
# Hardhat coverage
hardhat coverage
if [ "${CI:-"false"}" == "true" ]; then
# Foundry coverage
forge coverage --report lcov
# Remove zero hits
sed -i '/,0/d' lcov.info
fi
# Reports are then uploaded to Codecov automatically by workflow, and merged.