Skip to content

Commit 52bdc11

Browse files
philippecamachodailinsubjam
authored andcommitted
Readd devnet tests to CI. (#257)
* Readd devnet tests to CI. *Fix for batcher restart test in CI. (cherry picked from commit f37ea91)
1 parent 40ac528 commit 52bdc11

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/espresso-devnet-tests.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ jobs:
6161
- name: Run Withdraw test
6262
run: go test -timeout 30m -p 1 -count 1 -run 'TestWithdrawal' -v ./espresso/devnet-tests/...
6363

64+
- name: Run Batcher Restart test
65+
run: go test -timeout 30m -p 1 -count 1 -run 'TestBatcherRestart' -v ./espresso/devnet-tests/...
66+
67+
- name: Run Key Rotation test
68+
run: go test -timeout 30m -p 1 -count 1 -run 'TestKeyRotation' -v ./espresso/devnet-tests/...
69+
70+
# - name: Run Change Batch Inbox Owner test
71+
# run: go test -timeout 30m -p 1 -count 1 -run 'TestChangeBatchInboxOwner -v ./espresso/devnet-tests/...
6472

6573
- name: Save Nix cache
6674
uses: nix-community/cache-nix-action/save@v6

espresso/devnet-tests/devnet_tools.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,16 @@ func (d *Devnet) SubmitL2Tx(applyTxOpts helpers.TxOptsFn) (*types.Receipt, error
296296

297297
// Waits for a previously submitted transaction to be confirmed by the verifier.
298298
func (d *Devnet) VerifyL2Tx(receipt *types.Receipt) error {
299-
ctx, cancel := context.WithTimeout(d.ctx, 2*time.Minute)
299+
// Use longer timeout in CI environments due to Espresso processing delays
300+
timeout := 2 * time.Minute
301+
302+
// Check if running in CI environment
303+
if os.Getenv("CI") != "" || os.Getenv("GITHUB_ACTIONS") != "" {
304+
timeout = 5 * time.Minute
305+
log.Info("CI environment detected, using extended timeout for transaction verification", "hash", receipt.TxHash, "timeout", timeout)
306+
}
307+
308+
ctx, cancel := context.WithTimeout(d.ctx, timeout)
300309
defer cancel()
301310

302311
log.Info("waiting for transaction verification", "hash", receipt.TxHash)

0 commit comments

Comments
 (0)