From 774ff7e2c00ac01bc005dc0a35b01a4ac56c08b2 Mon Sep 17 00:00:00 2001 From: Nadir Akhtar Date: Fri, 7 Feb 2025 15:35:31 -0800 Subject: [PATCH] refactor: remove and modify some small details --- .github/workflows/forge-test-intense.yml | 5 ++--- .github/workflows/foundry.yml | 25 ++++++++++-------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/forge-test-intense.yml b/.github/workflows/forge-test-intense.yml index 1d488db7..61e3ca15 100644 --- a/.github/workflows/forge-test-intense.yml +++ b/.github/workflows/forge-test-intense.yml @@ -4,7 +4,6 @@ on: workflow_dispatch: push: branches: - - master - mainnet - testnet-holesky - dev @@ -30,13 +29,13 @@ jobs: submodules: recursive # Install the Foundry toolchain. - - name: "Install Foundry" + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: stable # Build the project and display contract sizes. - - name: "Forge Build" + - name: Forge Build run: | forge --version forge build --sizes diff --git a/.github/workflows/foundry.yml b/.github/workflows/foundry.yml index 242adf53..52f86809 100644 --- a/.github/workflows/foundry.yml +++ b/.github/workflows/foundry.yml @@ -4,9 +4,8 @@ on: workflow_dispatch: push: branches: - - master - mainnet - - testnet-goerli + - testnet-holesky - dev pull_request: @@ -24,8 +23,6 @@ jobs: test: name: Test runs-on: ubuntu-latest - strategy: - fail-fast: true steps: # Check out repository with all submodules for complete codebase access. - uses: actions/checkout@v4 @@ -33,30 +30,30 @@ jobs: submodules: recursive # Install the Foundry toolchain. - - name: "Install Foundry" + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: stable # Run Forge's formatting checker to ensure consistent code style. - - name: "Forge Fmt" + - name: Forge Fmt run: | forge fmt --check id: fmt # Build the project and display contract sizes. - - name: "Forge Build" + - name: Forge Build run: | forge --version forge build --sizes id: build # Run local tests (unit and integration). - - name: "Forge Test (Local)" + - name: Forge Test (Local) run: forge test -vvv # Run integration tests using a mainnet fork. - - name: "Forge Test Integration (Fork)" + - name: Forge Test Integration (Fork) run: FOUNDRY_PROFILE=forktest forge test --match-contract Integration -vvv # ----------------------------------------------------------------------- @@ -66,8 +63,6 @@ jobs: run-coverage: name: Coverage runs-on: ubuntu-latest - strategy: - fail-fast: true steps: # Check out repository with all submodules for complete codebase access. - uses: actions/checkout@v4 @@ -75,7 +70,7 @@ jobs: submodules: recursive # Install the Foundry toolchain. - - name: "Install Foundry" + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: stable @@ -87,7 +82,7 @@ jobs: id: lcov # Build the project and display contract sizes. - - name: "Forge Build" + - name: Forge Build run: | forge --version forge build --sizes @@ -107,7 +102,7 @@ jobs: path: report/* # Check coverage threshold after uploading report - - name: Check Coverage Threshold + - name: Check Coverage Threshold for >=90% 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:]') @@ -145,7 +140,7 @@ jobs: submodules: recursive # Install the Foundry toolchain. - - name: "Install Foundry" + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: stable