Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max old space size on coverage and test #5382

Merged
merged 10 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prepack": "scripts/prepack.sh",
"generate": "scripts/generate/run.js",
"version": "scripts/release/version.sh",
"test": "hardhat test",
"test": "NODE_OPTIONS=\"--max-old-space-size=8192\" hardhat test",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove that from the tests?

My understanding is that it was only really needed for the coverage ... and we now have an elegant integration in coverage.sh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your thoughts on the current state?

"test:generation": "scripts/checks/generation.sh",
"test:inheritance": "scripts/checks/inheritance-ordering.js artifacts/build-info/*",
"test:pragma": "scripts/checks/pragma-consistency.js artifacts/build-info/*",
Expand Down
5 changes: 5 additions & 0 deletions scripts/checks/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -euo pipefail

export COVERAGE=true
export FOUNDRY_FUZZ_RUNS=10
export NODE_OPTIONS="${NODE_OPTIONS:-}"

if [[ $NODE_OPTIONS != *"--max-old-space-size"* ]]; then
export NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=8192"
fi

# Hardhat coverage
hardhat coverage
Expand Down
Loading