-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
20 deletions.
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 |
---|---|---|
|
@@ -42,23 +42,5 @@ jobs: | |
echo $(($EPOCHSECONDS - $EPOCHSECONDS % 604800)) | ||
)" >> $GITHUB_ENV | ||
# TODO: Rework the job to correctly print the output of the test command | ||
- name: Run tests with gas reporting | ||
run: forge test --gas-report > gasreport.ansi | ||
|
||
- name: Compare gas reports | ||
uses: Rubilmax/[email protected] | ||
with: | ||
summaryQuantile: 0.8 # only display the 20% most significant gas diffs in the summary | ||
sortCriteria: avg,max # sort diff rows by criteria | ||
sortOrders: desc,asc # and directions | ||
id: gas_diff | ||
|
||
# Comment on the PR with the gas diff | ||
- name: Add gas diff to sticky comment | ||
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
# delete the comment in case changes no longer impact gas costs | ||
delete: ${{ !steps.gas_diff.outputs.markdown }} | ||
message: ${{ steps.gas_diff.outputs.markdown }} | ||
- name: Run tests | ||
run: forge test |