Skip to content

Commit b78e549

Browse files
committed
add system-test workflow
2 parents 395e2df + 424fa81 commit b78e549

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/system-test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: System Test
2+
3+
on:
4+
pull_request:
5+
branches: [ 'develop', 'release_**' ]
6+
types: [ opened, edited, synchronize, reopened ]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
system-test:
14+
name: System Test (JDK 8 / x86_64)
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Set up JDK 8
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '8'
22+
distribution: 'temurin'
23+
24+
- name: Clone system-test
25+
run: |
26+
git clone https://github.com/tronprotocol/system-test.git
27+
cd system-test
28+
git checkout release_workflow
29+
30+
- name: Checkout java-tron
31+
uses: actions/checkout@v4
32+
with:
33+
path: java-tron
34+
35+
- name: Cache Gradle packages
36+
uses: actions/cache@v4
37+
with:
38+
path: |
39+
~/.gradle/caches
40+
~/.gradle/wrapper
41+
key: ${{ runner.os }}-gradle-system-test-${{ hashFiles('java-tron/**/*.gradle', 'java-tron/**/gradle-wrapper.properties') }}
42+
restore-keys: ${{ runner.os }}-gradle-system-test-
43+
44+
- name: Build java-tron
45+
working-directory: java-tron
46+
run: ./gradlew clean build -x test --no-daemon
47+
48+
- name: Copy config and start FullNode
49+
run: |
50+
cp system-test/testcase/src/test/resources/config-system-test.conf java-tron/
51+
cd java-tron
52+
nohup java -jar build/libs/FullNode.jar --witness -c config-system-test.conf > fullnode.log 2>&1 &
53+
echo "FullNode started, waiting 30 seconds..."
54+
sleep 30
55+
echo "=== FullNode log (last 30 lines) ==="
56+
tail -30 fullnode.log || true
57+
58+
- name: Run system tests
59+
working-directory: system-test
60+
run: |
61+
cp solcDIR/solc-linux-0.8.6 solcDIR/solc
62+
./gradlew clean --no-daemon
63+
./gradlew --info stest --no-daemon
64+
65+
- name: Upload FullNode log
66+
if: always()
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: fullnode-log
70+
path: java-tron/fullnode.log
71+
if-no-files-found: warn

0 commit comments

Comments
 (0)