feat(contracts): ValueRouter #1147
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 Storage Layout Changes | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- 'solidity/**' | |
workflow_dispatch: | |
jobs: | |
diff-check: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the PR branch | |
- name: Checkout PR branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: yarn-cache | |
uses: buildjet/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
.yarn | |
key: ${{ runner.os }}-yarn-4.5.1-cache-${{ hashFiles('./yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-4.5.1-cache- | |
- name: yarn-install | |
run: yarn install | |
- name: foundry-install | |
uses: foundry-rs/foundry-toolchain@v1 | |
# Run the command on PR branch | |
- name: Run command on PR branch | |
run: yarn workspace @hyperlane-xyz/core storage HEAD-storage | |
# Checkout the target branch (base) | |
- name: Checkout target branch (base) contracts | |
env: | |
BASE_REF: ${{ github.event.pull_request.base.sha }} | |
run: | | |
git fetch origin $BASE_REF | |
git checkout $BASE_REF -- solidity/contracts | |
# Run the command on the target branch | |
- name: Run command on target branch | |
run: yarn workspace @hyperlane-xyz/core storage base-storage | |
# Compare outputs | |
- name: Compare outputs | |
run: diff --unified solidity/base-storage solidity/HEAD-storage |