Skip to content

Commit

Permalink
refactor: foundry.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
0xClandestine committed Jan 30, 2025
1 parent 718843e commit 44806d3
Showing 1 changed file with 35 additions and 37 deletions.
72 changes: 35 additions & 37 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,40 @@ jobs:
- name: Forge Test (Intense)
run: FOUNDRY_PROFILE=intense forge test

# -----------------------------------------------------------------------
# Forge Storage Diff
# -----------------------------------------------------------------------

storage-diff:
name: Test (Upgrade)
runs-on: ubuntu-latest
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
forge build --sizes
echo "## Build result"
echo "✅ Passed"
id: build

# Run storage diff check to detect storage layout incompatibilities.
- name: "Mainnet Storage Diff"
run: |
bash bin/storage-diff.sh --rpc-url ${{ secrets.RPC_MAINNET }} --etherscan-key ${{ secrets.ETHERSCAN_API_KEY }} --input .github//storage-diff.json
id: storage-diff

# -----------------------------------------------------------------------
# Forge Coverage
# -----------------------------------------------------------------------
Expand Down Expand Up @@ -174,40 +208,4 @@ jobs:
echo -e "\033[1;32m✅ Functions coverage ($FUNCTIONS_PCT%) meets minimum threshold of 90%\033[0m"
fi
if [ $FAILED -eq 1 ]; then
exit 1
fi
# -----------------------------------------------------------------------
# Forge Storage Diff
# -----------------------------------------------------------------------

storage-diff:
name: Test (Upgrade)
runs-on: ubuntu-latest
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
forge build --sizes
echo "## Build result"
echo "✅ Passed"
id: build

# Run storage diff check to detect storage layout incompatibilities.
- name: "Mainnet Storage Diff"
run: |
bash bin/storage-diff.sh --rpc-url ${{ secrets.RPC_MAINNET }} --etherscan-key ${{ secrets.ETHERSCAN_API_KEY }} --input .github//storage-diff.json
id: storage-diff
[ $FAILED -eq 1 ] && exit 1

0 comments on commit 44806d3

Please sign in to comment.