|
10 | 10 | env: |
11 | 11 | ERIGON_DATA_DIR: /opt/erigon/datadir |
12 | 12 | RPC_PAST_TEST_DIR: /opt/rpc-past-tests |
| 13 | + ERIGON_QA_PATH: /opt/erigon-qa |
13 | 14 |
|
14 | 15 | steps: |
15 | 16 | - name: Checkout Silkworm repository |
@@ -40,19 +41,24 @@ jobs: |
40 | 41 | working-directory: ${{runner.workspace}}/silkworm/build |
41 | 42 | run: cmake --build . --config Release --target rpcdaemon -j 8 |
42 | 43 |
|
| 44 | + - name: Pause the Erigon instance dedicated to db maintenance |
| 45 | + run: | |
| 46 | + python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true |
| 47 | +
|
43 | 48 | - name: Run Silkworm RpcDaemon |
44 | 49 | working-directory: ${{runner.workspace}}/silkworm/build/cmd |
45 | 50 | run: | |
46 | 51 | ./rpcdaemon --datadir $ERIGON_DATA_DIR --api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --log.verbosity 1 --erigon_compatibility --jwt ./jwt.hex --skip_protocol_check & |
47 | 52 | RPC_DAEMON_PID=$! |
48 | 53 | echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV |
49 | 54 |
|
50 | | - - name: Run RPC Performances Tests |
| 55 | + - name: Run RPC Performance Tests |
51 | 56 | id: test_step |
52 | 57 | run: | |
53 | 58 | set +e # Disable exit on error |
54 | 59 | |
55 | 60 | cd ${{runner.workspace}}/rpc-tests/perf |
| 61 | + rm -rf ./reports/mainnet |
56 | 62 | |
57 | 63 | # Launch the RPC performance test runner |
58 | 64 | python3 ./run_perf_tests.py -b mainnet -y eth_call -p pattern/mainnet/stress_test_eth_call_001_14M.tar -t 1:1,100:30,1000:20,10000:20,20000:20 -r 20 -s ${{runner.workspace}}/silkworm -g $ERIGON_DATA_DIR -m 2 -u |
|
66 | 72 | # Capture test runner script exit status |
67 | 73 | perf_exit_status=$? |
68 | 74 | |
69 | | - # Save test results to a directory with timestamp and commit hash |
70 | | - mv ${{runner.workspace}}/rpc-tests/perf/reports/mainnet $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git rev-parse --short HEAD) |
| 75 | + # Save test results to a directory with timestamp and commit hash |
| 76 | + cp -r ${{runner.workspace}}/rpc-tests/perf/reports/mainnet $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_perf_$(git -C ${{runner.workspace}}/silkworm rev-parse --short HEAD) |
71 | 77 | |
72 | 78 | # Check test runner script exit status |
73 | 79 | if [ $perf_exit_status -eq 0 ]; then |
|
89 | 95 | echo "rpc-daemon has already terminated" |
90 | 96 | fi |
91 | 97 |
|
| 98 | + - name: Resume the Erigon instance dedicated to db maintenance |
| 99 | + run: | |
| 100 | + python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true |
| 101 | +
|
| 102 | + - name: Upload test results |
| 103 | + if: always() |
| 104 | + uses: actions/upload-artifact@v4 |
| 105 | + with: |
| 106 | + name: test-results |
| 107 | + path: ${{runner.workspace}}/rpc-tests/perf/reports/mainnet |
| 108 | + |
| 109 | + - name: Save test results |
| 110 | + if: always() |
| 111 | + working-directory: ${{runner.workspace}}/silkworm |
| 112 | + env: |
| 113 | + TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }} |
| 114 | + run: python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo silkworm --commit $(git rev-parse HEAD) --test_name rpc-performance-tests --outcome $TEST_RESULT #--result_file ${{runner.workspace}}/rpc-tests/perf/reports/mainnet/result.json |
| 115 | + |
92 | 116 | - name: Action for Success |
93 | 117 | if: steps.test_step.outputs.TEST_RESULT == 'success' |
94 | 118 | run: echo "::notice::Tests completed successfully" |
|
0 commit comments