ci: fix job that checks anvil state is up-to-date #14
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: 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: | | |
# Run git diff to check all changes | |
echo $(git status --porcelain) | |
git diff state.json | |
if [ $? -eq 0 ]; then | |
echo "The anvil dump is outdated"; | |
exit 1 | |
fi |