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 all 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
4 changes: 0 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,7 @@ jobs:
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- run: rm foundry.toml
- uses: crytic/[email protected]
with:
node-version: 18.15
slither-version: 0.10.1

codespell:
runs-on: ubuntu-latest
Expand Down
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": "scripts/set-max-old-space-size.sh && hardhat test",
"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
2 changes: 2 additions & 0 deletions scripts/checks/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -euo pipefail
export COVERAGE=true
export FOUNDRY_FUZZ_RUNS=10

scripts/set-max-old-space-size.sh

# Hardhat coverage
hardhat coverage

Expand Down
10 changes: 10 additions & 0 deletions scripts/set-max-old-space-size.sh
Original file line number Diff line number Diff line change
@@ -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
Loading