Skip to content

Commit dcd9076

Browse files
committed
ci(system-test): drive node bring-up through trond [Phase A — DO NOT MERGE]
Replace the inline `nohup java -jar build/libs/FullNode.jar --witness -c <conf> &` block with a declarative trond invocation that encapsulates: HOCON template embedding, systemd-managed lifecycle, deterministic teardown, and structured log/journal capture. Net effect: - Same single-SR private chain, same testng.conf endpoints (HTTP 8090 / gRPC 50051 / P2P 18888 / JSON-RPC 8545). - The 80+ line "Copy config and start FullNode" step shrinks to one bash invocation: `bash system-test/scripts/stest-up.sh`. - On failure, the systemd journal for the unit is dumped to logs/journal.log instead of relying on ad-hoc fullnode.log. - Teardown step (`if: always()`) runs `trond network destroy` so the next CI run starts clean. This commit is Phase A: the system-test checkout points at warku123/system-test:feat/trond-bridge and stest-up.sh defaults to warku123/tron-deployment v0.1.0 release. A follow-up Phase B commit on this branch will flip both references to upstream (tronprotocol/system-test:release_workflow + the upstream trond release URL) once tron-deployment has merged the system-test-integration change and cut v0.1.0 on upstream. Until then this PR must not be merged into upstream. Linked: openspec change `system-test-integration` in tronprotocol/tron-deployment (Phase 4).
1 parent 22e0aa3 commit dcd9076

1 file changed

Lines changed: 42 additions & 27 deletions

File tree

.github/workflows/system-test.yml

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,20 @@ jobs:
2727
java-version: '8'
2828
distribution: 'temurin'
2929

30+
# Phase A note: while the system-test integration is under
31+
# review, this checkout points at the warku123 fork's
32+
# feat/trond-bridge branch so the new scripts/stest-up.sh and
33+
# the trond-based bring-up flow can be exercised end-to-end on
34+
# this fork's CI. Once tronprotocol/tron-deployment has merged
35+
# the system-test-integration change and cut v0.1.0, the
36+
# repository / ref below will be flipped back to
37+
# tronprotocol/system-test + release_workflow as part of the
38+
# Phase B switchover commit.
3039
- name: Clone system-test
3140
uses: actions/checkout@v5
3241
with:
33-
repository: tronprotocol/system-test
34-
ref: release_workflow
42+
repository: warku123/system-test
43+
ref: feat/trond-bridge
3544
path: system-test
3645

3746
- name: Checkout java-tron
@@ -52,28 +61,14 @@ jobs:
5261
working-directory: java-tron
5362
run: ./gradlew clean build -x test --no-daemon
5463

55-
- name: Copy config and start FullNode
56-
run: |
57-
cp system-test/testcase/src/test/resources/config-system-test.conf java-tron/
58-
cd java-tron
59-
nohup java -jar build/libs/FullNode.jar --witness -c config-system-test.conf > fullnode.log 2>&1 &
60-
echo "FullNode started, waiting for it to be ready..."
61-
62-
MAX_ATTEMPTS=60
63-
INTERVAL=5
64-
for i in $(seq 1 $MAX_ATTEMPTS); do
65-
if curl -s --fail "http://localhost:8090/wallet/getblockbynum?num=1" > /dev/null 2>&1; then
66-
echo "FullNode is ready! (attempt $i)"
67-
exit 0
68-
fi
69-
echo "Waiting... (attempt $i/$MAX_ATTEMPTS)"
70-
sleep $INTERVAL
71-
done
72-
73-
echo "FullNode failed to start within $((MAX_ATTEMPTS * INTERVAL)) seconds."
74-
echo "=== FullNode log (last 50 lines) ==="
75-
tail -50 fullnode.log || true
76-
exit 1
64+
# Phase A note: trond release URL points at the warku123 fork
65+
# while the system-test integration is in review. The Phase B
66+
# switchover commit will repoint to
67+
# tronprotocol/tron-deployment after upstream merge + release.
68+
- name: Bring up the stest single-SR via trond
69+
env:
70+
STEST_JAR: ${{ github.workspace }}/java-tron/build/libs/FullNode.jar
71+
run: bash system-test/scripts/stest-up.sh
7772

7873
- name: Run system tests
7974
working-directory: system-test
@@ -86,10 +81,30 @@ jobs:
8681
./gradlew clean --no-daemon
8782
./gradlew --info stest --no-daemon
8883
89-
- name: Upload FullNode log
84+
- name: Capture node log + journal
85+
if: always()
86+
run: |
87+
mkdir -p logs
88+
# trond writes the FullNode stdout/stderr through systemd's
89+
# journal; dump the full journal for the unit so post-mortem
90+
# works without ssh access to the runner.
91+
sudo journalctl -u tron-stest-singlenode --no-pager -o short-iso > logs/journal.log 2>&1 || true
92+
# If a node.log exists in the install path (some trond
93+
# invocations write directly), capture that too.
94+
sudo cp /opt/tron/stest-singlenode/node.log logs/node.log 2>/dev/null || true
95+
sudo chown -R "$USER:$USER" logs/
96+
ls -lah logs/
97+
98+
- name: Tear down stest deployment
99+
if: always()
100+
env:
101+
STEST_KEEP_DATA: ""
102+
run: bash system-test/scripts/stest-down.sh
103+
104+
- name: Upload trond + node logs
90105
if: always()
91106
uses: actions/upload-artifact@v6
92107
with:
93-
name: fullnode-log
94-
path: java-tron/fullnode.log
108+
name: stest-node-logs
109+
path: logs/
95110
if-no-files-found: warn

0 commit comments

Comments
 (0)