-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(contracts-rfq): gas bench script (#3283)
* chore: add gas:bench script * ci: use the defined script
- Loading branch information
1 parent
bc21cfa
commit de92c1f
Showing
2 changed files
with
4 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 |
---|---|---|
|
@@ -267,7 +267,9 @@ jobs: | |
- name: Run tests and generate gas report | ||
working-directory: './packages/${{matrix.package}}' | ||
# 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" | ||
# Note: we use `npm run` with `--if-present` flag, allows not to define a gas:bench script in every package | ||
# This is not natively supported by yarn yet, see: https://github.com/yarnpkg/yarn/pull/7159 | ||
run: npm run gas:bench --if-present > "../../gas-report-${{ matrix.package }}.ansi" | ||
|
||
- name: Compare gas reports | ||
uses: Rubilmax/[email protected] | ||
|
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