Skip to content

Commit 94da0a6

Browse files
feat: add network diagnostics and state dump action (#2051)
* feat: add network diagnostics and state dump action * remove: exit 1
1 parent 96df644 commit 94da0a6

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,6 @@ jobs:
115115
name: unitTest-coverage
116116
path: cover.out
117117

118-
# - name: Data race tests
119-
# run: make test-race
120-
121-
# # TODO: make it work
122-
# - name: Reproducible build test
123-
# run: |
124-
# make geth
125-
# shasum -a256 ./build/bin/geth > bor1.sha256
126-
# make geth
127-
# shasum -a256 ./build/bin/geth > bor2.sha256
128-
# if ! cmp -s bor1.sha256 bor2.sha256; then
129-
# echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1
130-
# fi
131-
132118
integration-tests:
133119
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
134120
strategy:

.github/workflows/kurtosis-e2e.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
polycli version
141141
142142
- name: Run smoke tests
143+
id: smoke-tests
143144
working-directory: pos-workflows/tests
144145
run: bash kurtosis_smoke_test.sh
145146

@@ -149,12 +150,23 @@ jobs:
149150
go-version: 'stable'
150151

151152
- name: Run RPC tests
153+
id: rpc-tests
152154
working-directory: pos-workflows/tests/rpc_tests
153155
run: |
154156
export RPC_URL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} l2-el-1-bor-heimdall-v2-validator rpc)
155157
export PRIV_KEY="0xd40311b5a5ca5eaeb48dfba5403bde4993ece8eccf4190e98e19fcd4754260ea"
156158
go run . --priv-key "$PRIV_KEY" --rpc-url "$RPC_URL" --log-req-res true
157159
160+
# Collect diagnostics on failure
161+
- name: Collect network diagnostics and state dump
162+
if: >-
163+
always() && (
164+
steps.smoke-tests.outcome == 'failure' ||
165+
steps.rpc-tests.outcome == 'failure')
166+
uses: ./pos-workflows/.github/actions/network-diagnostics-and-state-dump
167+
with:
168+
enclave_name: ${{ env.ENCLAVE_NAME }}
169+
158170
# Clean up
159171
- name: Post kurtosis run
160172
if: always()

.github/workflows/kurtosis-stateless-e2e.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,17 @@ jobs:
141141
polycli version
142142
143143
- name: Run stateless e2e tests
144+
id: stateless-tests
144145
working-directory: pos-workflows/tests/stateless_tests
145146
run: bash kurtosis_stateless_test.sh
146147

148+
# Collect diagnostics on failure
149+
- name: Collect network diagnostics and state dump
150+
if: always() && steps.stateless-tests.outcome == 'failure'
151+
uses: ./pos-workflows/.github/actions/network-diagnostics-and-state-dump
152+
with:
153+
enclave_name: ${{ env.ENCLAVE_NAME }}
154+
147155
# Clean up
148156
- name: Post kurtosis run
149157
if: always()

0 commit comments

Comments
 (0)