Skip to content

Merge branch 'dev' into feat/phase-2-cleanup #9

Merge branch 'dev' into feat/phase-2-cleanup

Merge branch 'dev' into feat/phase-2-cleanup #9

name: Report Gas Differences
on:
pull_request:
push:
branches:
- '**' # This line ensures that pushes to any branch are considered.
jobs:
compare_gas_reports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run Tests and Generate Gas Report
run: forge test --gas-report > gasreport.ansi
env:
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
- name: Compare Gas Reports
uses: Rubilmax/[email protected]
with:
report: gasreport.ansi
base: ${{ github.base_ref || 'main' }}
head: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
summaryQuantile: 0.9
sortCriteria: 'avg,max'
sortOrders: 'desc,asc'
ignore: 'test-foundry/**/*'
id: gas_diff
- name: Post Gas Diff as Sticky Comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
delete: ${{ !steps.gas_diff.outputs.markdown }}
message: ${{ steps.gas_diff.outputs.markdown }}