Skip to content

ci: fix job that checks anvil state is up-to-date #11

ci: fix job that checks anvil state is up-to-date

ci: fix job that checks anvil state is up-to-date #11

name: Check anvil dump up-to-date
on:
push:
branches: [main]
pull_request:
branches: [ '**' ]
# This makes the job run only when any of these files has been changed
paths:
- 'crates/contracts/lib/**'
- 'crates/contracts/script/**'
- 'crates/contracts/src/**'
jobs:
check:
name: Check anvil dump is up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Check the anvil dump has changed
working-directory: crates/contracts/anvil/contracts_deployed_anvil_state.json
run: |
git diff state.json
if [ $? -eq 0 ]; then
echo "The anvil dump is outdated";
exit 1
fi