Skip to content

Commit 7c07eb1

Browse files
committed
test: save/restore rpc cache
1 parent 187d2a8 commit 7c07eb1

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/build-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ jobs:
247247
install-command: pnpm install --frozen-lockfile
248248
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
249249

250+
- name: Restore anvil RPC cache
251+
id: anvil-rpc-cache-restore
252+
uses: actions/cache/restore@v4
253+
with:
254+
path: .cache/anvil-rpc-cache.json
255+
key: ${{ runner.os }}-anvil-rpc-cache-${{ github.ref_name }}-${{ github.run_id }}
256+
restore-keys: |
257+
${{ runner.os }}-anvil-rpc-cache-${{ github.ref_name }}-
258+
${{ runner.os }}-anvil-rpc-cache-main-
259+
${{ runner.os }}-anvil-rpc-cache-
260+
250261
- name: Copy .env
251262
run: cp ./.env.example ./.env
252263

@@ -255,3 +266,10 @@ jobs:
255266

256267
- name: Test
257268
run: pnpm test:integration:anvil
269+
270+
- name: Save anvil RPC cache
271+
if: always()
272+
uses: actions/cache/save@v4
273+
with:
274+
path: .cache/anvil-rpc-cache.json
275+
key: ${{ runner.os }}-anvil-rpc-cache-${{ github.ref_name }}-${{ github.run_id }}

src/integrationTestHelpers/anvilHarness.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,13 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
338338

339339
console.log('L2 rollup creator deployed\n');
340340

341-
const customGasTokenMintAmount = parseEther('10');
342-
343341
await (
344342
await customGasToken.deposit({
345-
value: customGasTokenMintAmount,
343+
value: parseEther('10'),
346344
...testConstants.LOW_L2_FEE_OVERRIDES,
347345
})
348346
).wait();
349-
console.log('[chain-sdk-int-test] source L2 shared deployer funded');
347+
console.log('L2 funding done\n');
350348

351349
const l2Chain = defineChain({
352350
id: l2ChainId,

0 commit comments

Comments
 (0)