|
8 | 8 | branches: [ '**' ] |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - check: |
12 | | - name: Check anvil dump state is up to date |
| 11 | + rewardsv2: |
| 12 | + name: Check rewardsv2 anvil dump state is up to date |
13 | 13 | runs-on: ubuntu-latest |
14 | 14 |
|
15 | 15 | steps: |
|
23 | 23 | with: |
24 | 24 | filters: | |
25 | 25 | contracts: |
26 | | - - 'crates/contracts/lib/**' |
27 | | - - 'crates/contracts/script/**' |
28 | | - - 'crates/contracts/src/**' |
| 26 | + - 'crates/m2_contracts/lib/**' |
| 27 | + - 'crates/m2_contracts/script/**' |
| 28 | + - 'crates/m2_contracts/src/**' |
29 | 29 | |
30 | 30 | # This step runs only if some contract changed. |
31 | 31 | # It checks the diff in the anvil state file. |
|
34 | 34 | # Note: if the git diff fails to fetch the changes, then the step will also fail. |
35 | 35 | - name: Check the anvil dump has changed |
36 | 36 | if: steps.filter.outputs.contracts == 'true' |
37 | | - working-directory: crates/contracts/anvil/contracts_deployed_anvil_state.json |
| 37 | + working-directory: crates/m2_contracts/anvil/m2_contracts_deployed_anvil_state |
38 | 38 | run: | |
39 | 39 | if [ -z "$(git diff origin/${{ github.event.pull_request.base.ref }} -- state.json)" ]; then |
40 | 40 | echo "The anvil dump is outdated"; |
41 | 41 | exit 1 |
42 | 42 | fi |
| 43 | +
|
| 44 | + slashing: |
| 45 | + name: Check slashing anvil dump state is up to date |
| 46 | + runs-on: ubuntu-latest |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + fetch-depth: 0 |
| 52 | + |
| 53 | + # This step is needed to know if the contracts were changed. |
| 54 | + - uses: dorny/paths-filter@v3 |
| 55 | + id: filter |
| 56 | + with: |
| 57 | + filters: | |
| 58 | + contracts: |
| 59 | + - 'crates/operator_sets_contracts/lib/**' |
| 60 | + - 'crates/operator_sets_contracts/script/**' |
| 61 | + - 'crates/operator_sets_contracts/src/**' |
| 62 | + |
| 63 | + # This step runs only if some contract changed. |
| 64 | + # It checks the diff in the anvil state file. |
| 65 | + # If the diff is null, that means the anvil state has not changed, |
| 66 | + # i.e. the anvil state outdated and therefore this step will fail. |
| 67 | + # Note: if the git diff fails to fetch the changes, then the step will also fail. |
| 68 | + - name: Check the anvil dump has changed |
| 69 | + if: steps.filter.outputs.contracts == 'true' |
| 70 | + working-directory: crates/operator_sets_contracts/anvil/operatorset_contracts_deployed_anvil_state |
| 71 | + run: | |
| 72 | + if [ -z "$(git diff origin/${{ github.event.pull_request.base.ref }} -- state.json)" ]; then |
| 73 | + echo "The anvil dump is outdated"; |
| 74 | + exit 1 |
| 75 | + fi |
| 76 | +
|
0 commit comments