forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqa-sync-from-scratch-minimal-node.yml
More file actions
131 lines (110 loc) · 4.53 KB
/
qa-sync-from-scratch-minimal-node.yml
File metadata and controls
131 lines (110 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: QA - Sync from scratch (minimal node)
on:
push:
branches:
- 'release/3.*'
schedule:
- cron: '0 0 * * *' # Run every night at 00:00 AM UTC
workflow_dispatch: # Run manually
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
minimal-node-sync-from-scratch-test:
runs-on: [self-hosted, qa, long-running]
timeout-minutes: 1440 # 24 hours
strategy:
fail-fast: false
matrix:
chain: [ mainnet, gnosis ] # Chain name as specified on the erigon command line
env:
ERIGON_DATA_DIR: ${{ github.workspace }}/erigon_data
ERIGON_QA_PATH: /home/qarunner/erigon-qa
ERIGON_ASSERT: true
TRACKING_TIME_SECONDS: 7200 # 2 hours
TOTAL_TIME_SECONDS: 43200 # 18 hours
CHAIN: ${{ matrix.chain }}
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Clean Erigon Build & Data Directories
run: |
make clean
rm -rf $ERIGON_DATA_DIR
- name: Build Erigon
run: |
make erigon
working-directory: ${{ github.workspace }}
- name: Pause the Erigon instance dedicated to db maintenance
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true
- name: Run Erigon and monitor chain sync
id: test_step
run: |
set +e # Disable exit on error
# Run Erigon, wait sync and check ability to maintain sync
python3 $ERIGON_QA_PATH/test_system/qa-tests/tip-tracking/run_and_check_tip_tracking.py \
${{ github.workspace }}/build/bin $ERIGON_DATA_DIR $TRACKING_TIME_SECONDS $TOTAL_TIME_SECONDS Erigon3 $CHAIN minimal_node
# Capture monitoring script exit status
test_exit_status=$?
# Save the subsection reached status
echo "test_executed=true" >> "$GITHUB_OUTPUT"
# Check test runner script exit status
if [ $test_exit_status -eq 0 ]; then
echo "Tests completed successfully"
echo "::notice::Tests completed successfully"
echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT"
else
echo "Error detected during tests"
echo "::error::Error detected during tests"
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
exit 1
fi
- name: Upload Downloader Torrent Client Status
if: ${{ always() && steps.test_step.outputs.test_executed == 'true' }}
uses: actions/upload-artifact@v6
with:
name: torrent-client-status-${{ env.CHAIN }}
path: torrent-client-status.txt
- name: Save test results
if: ${{ always() && steps.test_step.outputs.test_executed == 'true' }}
env:
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
run: |
python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py \
--repo erigon \
--commit $(git rev-parse HEAD) \
--branch ${{ github.ref_name }} \
--test_name sync-from-scratch-minimal-node \
--chain $CHAIN \
--runner ${{ runner.name }} \
--outcome $TEST_RESULT \
--result_file ${{ github.workspace }}/result-$CHAIN.json
- name: Upload test results
if: ${{ always() && steps.test_step.outputs.test_executed == 'true' }}
uses: actions/upload-artifact@v6
with:
name: test-results-${{ env.CHAIN }}
path: |
${{ github.workspace }}/result-${{ env.CHAIN }}.json
${{ github.workspace }}/erigon_data/logs/
- name: Upload metric plots
if: ${{ always() && steps.test_step.outputs.test_executed == 'true' }}
uses: actions/upload-artifact@v6
with:
name: metric-plots-${{ env.CHAIN }}
path: ${{ github.workspace }}/metrics-${{ env.CHAIN }}-plots*
- name: Upload FD Leak Analysis
if: ${{ always() && steps.test_step.outputs.test_executed == 'true' }}
uses: actions/upload-artifact@v6
with:
name: fd-leak-analysis-${{ env.CHAIN }}
path: ${{ github.workspace }}/fd-leak-analysis-${{ env.CHAIN }}.md
- name: Clean up Erigon data directory
if: always()
run: |
rm -rf $ERIGON_DATA_DIR
- name: Resume the Erigon instance dedicated to db maintenance
if: always()
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true