Skip to content

feat(TBAEF-1634): Add signature discount validator #341

feat(TBAEF-1634): Add signature discount validator

feat(TBAEF-1634): Add signature discount validator #341

Workflow file for this run

name: test
on:
pull_request:
branches:
- main
env:
FOUNDRY_PROFILE: ci
BASE_SEPOLIA_RPC_URL: "https://sepolia.base.org"
BASE_MAINNET_RPC_URL: "https://mainnet.base.org"
jobs:
forge-test:
name: Run Forge Tests and Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install eth-abi
run: |
python3 -m pip install --upgrade pip
python3 -m pip install eth-abi
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Run Forge build
run: |
forge --version
id: build
- name: Run Forge tests
run: |
forge test -vvv --ffi
id: test
- name: Get changed Solidity files
id: changed-files
run: |
# Determine the range of commits to analyze
if [ "${{ github.event_name }}" == "pull_request" ]; then
BASE_COMMIT=${{ github.event.pull_request.base.sha }}
HEAD_COMMIT=${{ github.event.pull_request.head.sha }}
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR $BASE_COMMIT..$HEAD_COMMIT | grep '\.sol$' || true)
else
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR HEAD^..HEAD | grep '\.sol$' || true)
fi
echo "files=$CHANGED_FILES" >> $GITHUB_OUTPUT
echo "Changed Solidity files: $CHANGED_FILES"
- name: Check formatting on changed files
if: steps.changed-files.outputs.files != ''
run: |
echo "${{ steps.changed-files.outputs.files }}" | xargs forge fmt --check
id: fmt