Skip to content

Merge branch 'main' of https://github.com/LoadPipe/hamza-escrow #20

Merge branch 'main' of https://github.com/LoadPipe/hamza-escrow

Merge branch 'main' of https://github.com/LoadPipe/hamza-escrow #20

Workflow file for this run

name: Foundry CI
on:
push:
branches:
- main
pull_request:
jobs:
foundry-ci:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# Install Foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
# Run Foundry tests
- name: Run Foundry Tests
run: forge test -vvv --via-ir --optimizer-runs 200
# # Run coverage and ensure it's above 85%
# - name: Check Coverage
# run: |
# forge coverage
# COVERAGE=$(forge coverage --no-match-coverage "src/inc" | grep -oP '\d+\.\d+(?=%)' | tail -1)
# echo "Coverage: $COVERAGE%"
# if (( $(echo "$COVERAGE < 85" | bc -l) )); then
# echo "Test coverage is below 85%: $COVERAGE%"
# exit 1
# fi