feat: implement Webhook Templates, Payout Engine, Tagging Service, an… #184
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: Contracts (EVM) | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| evm: ${{ steps.filter.outputs.evm }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| evm: | |
| - 'contracts/evm/**' | |
| - '.github/workflows/contracts-evm.yml' | |
| test: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.evm == 'true' }} | |
| name: Compile, test & coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| defaults: | |
| run: | |
| working-directory: contracts/evm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: contracts/evm/package-lock.json | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: contracts/evm/node_modules | |
| key: ${{ runner.os }}-evm-modules-${{ hashFiles('contracts/evm/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-evm-modules- | |
| - name: Install dependencies | |
| run: npm ci --prefer-offline | |
| - name: Compile contracts | |
| run: npx hardhat compile | |
| - name: Validate upgrade safety (OZ dry-run) | |
| run: npx hardhat run scripts/upgrade.ts --network hardhat | |
| env: | |
| PROPOSE_ONLY: 'true' | |
| SPLITTER_CONTRACT: SplitterV2 | |
| continue-on-error: true | |
| - name: Type-check scripts & tests | |
| run: npm run lint | |
| - name: Generate TypeChain bindings | |
| run: npx hardhat typechain | |
| - name: Run Hardhat tests with gas report | |
| run: npm run test:gas | |
| - name: Run gas benchmark tests | |
| run: npx hardhat test test/gas/GasBenchmark.test.ts | |
| - name: Run coverage | |
| run: npx hardhat coverage | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| - name: Upload coverage artifact | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: evm-coverage | |
| path: contracts/evm/coverage | |
| retention-days: 14 |