Skip to content

Commit

Permalink
ci: use gas bench tests only
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Sep 27, 2024
1 parent bb1cd07 commit 129cde2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,10 @@ jobs:
with:
version: nightly

# TODO: consider defining a package-specific script for this
- name: Run tests and generate gas report
working-directory: './packages/${{matrix.package}}'
# Excluding tests with reverts to get accurate average gas cost estimates
run: forge test --nmt "(fail|revert)" --gas-report > "../../gas-report-${{ matrix.package }}.ansi"
env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
# Run separate set of tests (no fuzzing) to get accurate average gas cost estimates
run: forge test --mc GasBenchmark --gas-report > "../../gas-report-${{ matrix.package }}.ansi"

- name: Compare gas reports
uses: Rubilmax/[email protected]
Expand Down

0 comments on commit 129cde2

Please sign in to comment.