-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Foundry tests to coverage (#5098)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ coverage: | |
project: | ||
default: | ||
threshold: 1% | ||
ignore: | ||
- "test" | ||
- "contracts/mocks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/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. |