BUG-22: Fix frozen ETH index skipped for removed operators & refactor… #456
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: Echidna Fuzzing | |
| on: | |
| push: | |
| paths: | |
| - 'contracts/**' | |
| - 'test/echidna/**' | |
| - 'foundry.toml' | |
| - '.github/workflows/echidna.yaml' | |
| workflow_dispatch: | |
| jobs: | |
| discover-contracts: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| contracts: ${{ steps.discover.outputs.contracts }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Discover Echidna harnesses | |
| id: discover | |
| run: | | |
| python3 - <<'PY' >> "$GITHUB_OUTPUT" | |
| import json | |
| from pathlib import Path | |
| contracts = sorted(path.stem for path in Path("test/echidna").glob("*Echidna.sol")) | |
| if not contracts: | |
| raise SystemExit("No Echidna harnesses found under test/echidna") | |
| print(f"contracts={json.dumps(contracts)}") | |
| PY | |
| echidna: | |
| needs: discover-contracts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| contract: ${{ fromJSON(needs.discover-contracts.outputs.contracts) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| env: | |
| GH_TOKEN: ${{ secrets.github_token }} | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Run Echidna | |
| uses: crytic/echidna-action@v2 | |
| with: | |
| files: test/echidna/${{ matrix.contract }}.sol | |
| contract: ${{ matrix.contract }} | |
| config: test/echidna/echidna-ci.yaml | |
| crytic-args: --compile-force-framework foundry | |
| test-mode: property | |
| - name: Upload corpus | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: echidna-corpus-${{ matrix.contract }} | |
| path: crytic-export/ | |
| retention-days: 7 |