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 991682e commit 718843e
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: "Solhint"
run: bun run hint

# Build the project and display contract sizes, then add summary.
# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
version: stable

# Build the project and display contract sizes, then add summary.
# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
sudo apt-get install lcov
id: lcov

# Build the project and display contract sizes, then add summary.
# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
Expand All @@ -157,11 +157,7 @@ jobs:
- name: Check Coverage Threshold
run: |
LINES_PCT=$(lcov --summary lcov.info | grep "lines" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
FUNCTIONS_PCT=$(lcov --summary lcov.info | grep "functions" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
echo -e "\033[1;36mLines coverage: $LINES_PCT%\033[0m"
echo -e "\033[1;36mFunctions coverage: $FUNCTIONS_PCT%\033[0m"
FUNCTIONS_PCT=$(lcov --summary lcov.info | grep "functions" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
FAILED=0
if (( $(echo "$LINES_PCT < 90" | bc -l) )); then
Expand All @@ -187,7 +183,7 @@ jobs:
# -----------------------------------------------------------------------

storage-diff:
name: Preview (Upgrade)
name: Test (Upgrade)
runs-on: ubuntu-latest
steps:
# Check out repository with all submodules for complete codebase access.
Expand All @@ -201,6 +197,15 @@ jobs:
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: |
Expand Down

0 comments on commit 718843e

Please sign in to comment.