@@ -6,6 +6,9 @@ concurrency:
66 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
77 cancel-in-progress : true
88
9+ env :
10+ FOUNDRY_PROFILE : ci
11+
912# Set default permissions as restrictive as possible
1013permissions :
1114 actions : write # Required for upload-artifact
@@ -27,14 +30,12 @@ jobs:
2730 cache : ' npm'
2831 cache-dependency-path : ' **/package-lock.json'
2932
30- # Only cache node_modules, let setup-node handle npm cache
3133 - name : Cache node_modules
3234 uses : actions/cache@v4
3335 id : cache-node-modules
3436 continue-on-error : true
3537 with :
36- path : |
37- node_modules
38+ path : node_modules
3839 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
3940
4041 - name : Install Dependencies
@@ -58,20 +59,21 @@ jobs:
5859 cache : ' npm'
5960 cache-dependency-path : ' **/package-lock.json'
6061
61- # Install Foundry
62- - uses : foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
62+ - name : Install Foundry
63+ uses : foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e # v1.5
6364 with :
64- version : stable # or nightly
65+ version : stable
66+ cache : false
67+
68+ - name : Show Forge version
69+ run : forge --version
6570
66- # Restore node_modules
6771 - name : Restore node_modules
68- uses : actions/cache@v4
72+ uses : actions/cache/restore @v4
6973 continue-on-error : true
7074 with :
7175 path : node_modules
7276 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
73- restore-keys : |
74- ${{ runner.os }}-node-modules-
7577
7678 - name : Ensure Dependencies
7779 run : |
@@ -80,15 +82,14 @@ jobs:
8082 npm ci --prefer-offline --no-audit
8183 fi
8284
85+ - name : Check Solidity Formatting
86+ run : npm run sol:fmt:check
87+
8388 - name : Check Solidity Compilation
84- run : |
85- echo "Running Solidity compilation with cache..."
86- npm run sol:compile
89+ run : forge build --sizes
8790
88- - name : Check Solidity Solhint
89- run : |
90- echo "Running Solhint..."
91- npm run lint-solc
91+ - name : Check Solidity Linting
92+ run : npm run lint-solc
9293
9394 # Job 2: Check ESLint
9495 eslint :
@@ -105,16 +106,12 @@ jobs:
105106 cache : ' npm'
106107 cache-dependency-path : ' **/package-lock.json'
107108
108- # Restore node_modules from setup job
109109 - name : Restore node_modules
110- uses : actions/cache@v4
110+ uses : actions/cache/restore @v4
111111 continue-on-error : true
112112 with :
113- path : |
114- node_modules
113+ path : node_modules
115114 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
116- restore-keys : |
117- ${{ runner.os }}-node-modules-
118115
119116 - name : Ensure Dependencies
120117 run : |
@@ -148,16 +145,12 @@ jobs:
148145 cache : ' npm'
149146 cache-dependency-path : ' **/package-lock.json'
150147
151- # Restore node_modules from setup job
152148 - name : Restore node_modules
153- uses : actions/cache@v4
149+ uses : actions/cache/restore @v4
154150 continue-on-error : true
155151 with :
156- path : |
157- node_modules
152+ path : node_modules
158153 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
159- restore-keys : |
160- ${{ runner.os }}-node-modules-
161154
162155 - name : Ensure Dependencies
163156 run : |
@@ -184,16 +177,12 @@ jobs:
184177 cache : ' npm'
185178 cache-dependency-path : ' **/package-lock.json'
186179
187- # Restore node_modules from setup job
188180 - name : Restore node_modules
189- uses : actions/cache@v4
181+ uses : actions/cache/restore @v4
190182 continue-on-error : true
191183 with :
192- path : |
193- node_modules
184+ path : node_modules
194185 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
195- restore-keys : |
196- ${{ runner.os }}-node-modules-
197186
198187 - name : Ensure Dependencies
199188 run : |
@@ -232,16 +221,12 @@ jobs:
232221 cache : ' npm'
233222 cache-dependency-path : ' **/package-lock.json'
234223
235- # Restore node_modules from setup job
236224 - name : Restore node_modules
237- uses : actions/cache@v4
225+ uses : actions/cache/restore @v4
238226 continue-on-error : true
239227 with :
240- path : |
241- node_modules
228+ path : node_modules
242229 key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
243- restore-keys : |
244- ${{ runner.os }}-node-modules-
245230
246231 - name : Ensure Dependencies
247232 run : |
0 commit comments