refactor: foundry.toml
and CI
#3
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
jobs: | |
gas-report: | |
name: Report Gas | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install Dependencies | |
run: forge install | |
- name: Generate gas diff | |
uses: atarpara/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
include-fuzz-tests: true | |
# fresh-snapshots: true | |
include-new-contracts: true | |
id : 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 }} | |
# https://github.com/atarpara/foundry-snapshot-diff |