feat(TBAEF-1634): Add signature discount validator #344
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | | |
| 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 |