Simplify rewards deposit #349
This file contains 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: Mainnet contracts | |
on: | |
push: | |
branches: [master] | |
paths: | |
- "mainnet-contracts/**" | |
pull_request: | |
paths: | |
- "mainnet-contracts/**" | |
jobs: | |
codespell: | |
name: Check for spelling errors | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Codespell | |
uses: codespell-project/[email protected] | |
with: | |
path: mainnet-contracts | |
check_hidden: true | |
check_filenames: true | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
node-version: 20 | |
- name: Branch name | |
run: echo running on branch ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} | |
- name: Install yarn | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
# with: | |
# version: nightly-de33b6af53005037b463318d2628b5cfcaf39916 | |
# - name: Run tests | |
# working-directory: mainnet-contracts | |
# run: forge test -vvv --ffi --no-match-test test_register_operator_eigen_da_holesky | |
# env: | |
# ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }} | |
# HOLESKY_RPC_URL: ${{ secrets.HOLESKY_RPC_URL }} | |
- name: forge fmt | |
working-directory: mainnet-contracts | |
run: forge fmt | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "forge fmt" | |
file_pattern: '*.sol' | |
- name: List selectors | |
working-directory: mainnet-contracts | |
run: | | |
forge selectors list >> "$GITHUB_STEP_SUMMARY" | |
coverage: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
node-version: 20 | |
- name: Branch name | |
run: echo running on branch ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} | |
- name: Install yarn | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: "Generate the coverage report" | |
working-directory: mainnet-contracts | |
run: 'forge coverage --no-match-coverage "(script|test|mock|node_modules|integrations|echidna|L1RewardManagerUnsafe)" --no-match-contract "PufferModuleManagerHoleskyTestnetFFI" --report lcov -vvv' | |
env: | |
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }} | |
HOLESKY_RPC_URL: ${{ secrets.HOLESKY_RPC_URL }} | |
- name: "Upload coverage report to Codecov" | |
uses: "codecov/codecov-action@v4" | |
with: | |
verbose: true | |
fail_ci_if_error: true | |
name: mainnet-contracts | |
files: "./lcov.info" | |
token: ${{ secrets.CODECOV_TOKEN }} |