This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
375 lines (308 loc) · 11.8 KB
/
pull-request-build-and-test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
name: Pull Request - build and run tests
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
env:
EXCLUDE_TESTS: "Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|AaveV3ERC4626Test|ThenaERC4626Test"
FLAKY_TESTS: "AnyLiquidationTest|LiquidityMiningTest"
SLOW_TESTS: "MaxBorrowTest|OraclesDecimalsScalingTest|MinBorrowTest|LeveredPositionTest|OraclesDecimalsScalingTest"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Install Npm dependencies
run: npm install
- name: Lint
run: npm run lint
# build-and-test-bsc:
# needs: [lint]
# env:
# MNEMONIC: "${{ secrets.MNEMONIC }}"
# BSC_MAINNET_RPC_URL: https://bsc-dataseed.binance.org
# BSC_MAINNET_ARCHIVE_RPC_URL: https://rpc.ankr.com/bsc
# TEST_RUN_CHAINID: 56
# TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Install Foundry
# uses: onbjerg/foundry-toolchain@v1
# with:
# version: nightly
# - name: Install Forge dependencies
# run: forge install
# - name: Forge RPC cache
# uses: actions/cache@v3
# with:
# path: "~/.foundry/cache"
# key: rpc-cache-bsc-${{ hashFiles('rpc-cache-keyfile') }}
# - name: Run base tests for BSC mainnet
# run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
# - name: Run slow tests for BSC mainnet
# if: always()
# run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
# - name: Run flaky tests for BSC mainnet
# if: always()
# run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-polygon:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
POLYGON_MAINNET_RPC_URL: https://polygon.llamarpc.com
POLYGON_MAINNET_ARCHIVE_RPC_URL: https://rpc.ankr.com/polygon
TEST_RUN_CHAINID: 137
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-polygon-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Polygon mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Polygon mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Polygon mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-arbitrum:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
ARBITRUM_MAINNET_RPC_URL: https://1rpc.io/arb
ARBITRUM_MAINNET_ARCHIVE_RPC_URL: https://arb1.croswap.com/rpc
TEST_RUN_CHAINID: 42161
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-arbitrum-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Arbitrum mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Arbitrum mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Arbitrum mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-neon:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
NEON_RPC_URL: https://neon-proxy-mainnet.solana.p2p.org
NEON_ARCHIVE_RPC_URL: https://neon-proxy-mainnet.solana.p2p.org
TEST_RUN_CHAINID: 245022934
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-neon-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Neon mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Neon mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Neon mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-chapel:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
BSC_CHAPEL_RPC_URL: https://data-seed-prebsc-1-s3.binance.org:8545
BSC_CHAPEL_ARCHIVE_RPC_URL: https://data-seed-prebsc-1-s3.binance.org:8545
TEST_RUN_CHAINID: 97
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-chapel-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Chapel testnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Chapel testnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Chapel testnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
# build-and-test-ethereum:
# needs: [lint]
# env:
# MNEMONIC: "${{ secrets.MNEMONIC }}"
# TEST_RUN_CHAINID: 1
# TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
# ETHEREUM_MAINNET_RPC_URL: https://eth.llamarpc.com
# ETHEREUM_MAINNET_ARCHIVE_RPC_URL: https://rpc.ankr.com/eth
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Install Foundry
# uses: onbjerg/foundry-toolchain@v1
# with:
# version: nightly
# - name: Install Forge dependencies
# run: forge install
# - name: Forge RPC cache
# uses: actions/cache@v3
# with:
# path: "~/.foundry/cache"
# key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
# - name: Run base tests for Ethereum mainnet
# run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
# - name: Run slow tests for Ethereum mainnet
# if: always()
# run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
# - name: Run flaky tests for Ethereum mainnet
# if: always()
# run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-linea:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
TEST_RUN_CHAINID: 59144
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
LINEA_RPC_URL: https://rpc.linea.build
LINEA_ARCHIVE_RPC_URL: https://rpc.linea.build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Linea mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Linea mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Linea mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-zkevm:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
TEST_RUN_CHAINID: 1101
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
ZKEVM_MAINNET_RPC_URL: https://zkevm-rpc.com
ZKEVM_MAINNET_ARCHIVE_RPC_URL: https://zkevm-rpc.com
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for zkevm mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for zkevm mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for zkevm mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-local:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
TEST_RUN_CHAINID: 0
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run forge tests locally
run: forge test -vv --no-match-contract 'Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|AaveV3ERC4626Test|ThenaERC4626Test'