Set max old space size on coverage and test (#5382)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -25,7 +25,7 @@
|
|||||||
"prepack": "scripts/prepack.sh",
|
"prepack": "scripts/prepack.sh",
|
||||||
"generate": "scripts/generate/run.js",
|
"generate": "scripts/generate/run.js",
|
||||||
"version": "scripts/release/version.sh",
|
"version": "scripts/release/version.sh",
|
||||||
"test": "hardhat test",
|
"test": "scripts/set-max-old-space-size.sh && hardhat test",
|
||||||
"test:generation": "scripts/checks/generation.sh",
|
"test:generation": "scripts/checks/generation.sh",
|
||||||
"test:inheritance": "scripts/checks/inheritance-ordering.js artifacts/build-info/*",
|
"test:inheritance": "scripts/checks/inheritance-ordering.js artifacts/build-info/*",
|
||||||
"test:pragma": "scripts/checks/pragma-consistency.js artifacts/build-info/*",
|
"test:pragma": "scripts/checks/pragma-consistency.js artifacts/build-info/*",
|
||||||
|
|||||||
@ -5,6 +5,8 @@ set -euo pipefail
|
|||||||
export COVERAGE=true
|
export COVERAGE=true
|
||||||
export FOUNDRY_FUZZ_RUNS=10
|
export FOUNDRY_FUZZ_RUNS=10
|
||||||
|
|
||||||
|
scripts/set-max-old-space-size.sh
|
||||||
|
|
||||||
# Hardhat coverage
|
# Hardhat coverage
|
||||||
hardhat coverage
|
hardhat coverage
|
||||||
|
|
||||||
|
|||||||
10
scripts/set-max-old-space-size.sh
Executable file
10
scripts/set-max-old-space-size.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This script sets the node `--max-old-space-size` to 8192 if it is not set already.
|
||||||
|
# All existing `NODE_OPTIONS` are retained as is.
|
||||||
|
|
||||||
|
export NODE_OPTIONS="${NODE_OPTIONS:-}"
|
||||||
|
|
||||||
|
if [[ $NODE_OPTIONS != *"--max-old-space-size"* ]]; then
|
||||||
|
export NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=8192"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user