-
Notifications
You must be signed in to change notification settings - Fork 407
55 lines (44 loc) · 1.47 KB
/
storage-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Check Storage Layout Changes
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
diff-check:
runs-on: ubuntu-latest
steps:
# Checkout the PR branch
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 18
- name: yarn-install
run: yarn install
- name: foundry-install
uses: onbjerg/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 > layout.diff
- name: Comment PR with execution number
uses: yorhodes/[email protected]
with:
filePath: layout.diff
mdLanguage: diff
comment_tag: storagelayoutdiff