Skip to content

Verify EulerChains.json is in sync with addresses #1

Verify EulerChains.json is in sync with addresses

Verify EulerChains.json is in sync with addresses #1

name: Verify EulerChains.json
# EulerChains.json is generated by chains.js from the per-chain
# addresses in addresses/ and config/addresses/. This workflow fails
# if the committed EulerChains.json differs from what chains.js would
# produce against the current tree — catching hand edits and missed
# regenerations before they reach master.
on:
pull_request:
branches: [master]
paths:
- 'chains.js'
- 'EulerChains.json'
- 'addresses/**'
- 'config/addresses/**'
push:
branches: [master]
paths:
- 'chains.js'
- 'EulerChains.json'
- 'addresses/**'
- 'config/addresses/**'
workflow_dispatch:
jobs:
verify-chains-manifest:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Regenerate EulerChains.json
run: node chains.js
- name: Verify no drift
run: |
if ! git diff --quiet -- EulerChains.json; then
echo "::error::EulerChains.json is out of sync with the addresses in the repo."
echo "Run 'node chains.js' locally and commit the updated EulerChains.json."
echo ""
echo "Drift:"
git --no-pager diff -- EulerChains.json
exit 1
fi
echo "EulerChains.json matches the output of chains.js."