Skip to content

Commit f4908f7

Browse files
Merge branch 'node-real:main' into main
2 parents 9d40d68 + 8a68894 commit f4908f7

File tree

701 files changed

+39286
-28470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

701 files changed

+39286
-28470
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
steps:
3535
- uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0
3638
- uses: actions/setup-go@v4
3739
with:
3840
go-version: '1.21'
@@ -57,7 +59,7 @@ jobs:
5759
if: runner.os == 'Linux'
5860
uses: golangci/golangci-lint-action@v4
5961
with:
60-
version: v1.56.1
62+
version: v1.57.2
6163
skip-build-cache: true
6264
args: --help
6365

@@ -72,42 +74,50 @@ jobs:
7274
- name: Test
7375
run: make test
7476

75-
# tests-windows:
76-
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
77-
# strategy:
78-
# matrix:
79-
# os: [ windows-2022 ]
80-
# runs-on: ${{ matrix.os }}
81-
#
82-
# steps:
83-
# - name: configure Pagefile
84-
# uses: al-cheb/configure-pagefile-action@v1.3
85-
# with:
86-
# minimum-size: 8GB
87-
# - uses: actions/checkout@v3
88-
# - uses: actions/setup-go@v4
89-
# with:
90-
# go-version: '1.21'
91-
#
92-
# - uses: actions/cache@v3
93-
# with:
94-
# path: |
95-
# C:\ProgramData\chocolatey\lib\mingw
96-
# C:\ProgramData\chocolatey\lib\cmake
97-
# key: chocolatey-${{ matrix.os }}
98-
# - name: Install dependencies
99-
# run: |
100-
# choco upgrade mingw -y --no-progress --version 13.2.0
101-
# choco install cmake -y --no-progress --version 3.27.8
102-
#
103-
# - name: Build
104-
# run: .\wmake.ps1 all
105-
#
106-
# - name: Test
107-
# run: .\wmake.ps1 test
108-
#
109-
# - name: Test erigon-lib
110-
# run: cd erigon-lib && make test-no-fuzz
77+
- name: SonarCloud
78+
if: runner.os == 'Linux'
79+
uses: SonarSource/sonarcloud-github-action@v2.1.1
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
82+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
83+
continue-on-error: true
84+
85+
# tests-windows:
86+
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
87+
# strategy:
88+
# matrix:
89+
# os: [ windows-2022 ]
90+
# runs-on: ${{ matrix.os }}
91+
92+
# steps:
93+
# - name: configure Pagefile
94+
# uses: al-cheb/configure-pagefile-action@v1.3
95+
# with:
96+
# minimum-size: 8GB
97+
# - uses: actions/checkout@v3
98+
# - uses: actions/setup-go@v4
99+
# with:
100+
# go-version: '1.21'
101+
102+
# - uses: actions/cache@v3
103+
# with:
104+
# path: |
105+
# C:\ProgramData\chocolatey\lib\mingw
106+
# C:\ProgramData\chocolatey\lib\cmake
107+
# key: chocolatey-${{ matrix.os }}
108+
# - name: Install dependencies
109+
# run: |
110+
# choco upgrade mingw -y --no-progress --version 13.2.0
111+
# choco install cmake -y --no-progress --version 3.27.8
112+
113+
# - name: Build
114+
# run: .\wmake.ps1 all
115+
116+
# - name: Test
117+
# run: .\wmake.ps1 test
118+
119+
# - name: Test erigon-lib
120+
# run: cd erigon-lib && make test-no-fuzz
111121

112122
docker-build-check:
113123
# don't run this on devel - the PR must have run it to be merged and it misleads that this pushes the docker image

.github/workflows/coverage.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/qa-clean-exit-block-downloading.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ name: QA - Clean exit (block downloading)
33
on:
44
push:
55
branches:
6-
- 'release/**'
6+
- 'release/2.*'
77
pull_request:
88
branches:
99
- main
1010
- 'release/**'
1111
types:
1212
- ready_for_review
13+
workflow_dispatch: # Run manually
1314

1415
jobs:
1516
long-running-test:
16-
runs-on: self-hosted
17+
runs-on: [self-hosted, Erigon2]
1718
env:
18-
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-release/datadir
19+
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
1920
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
2021
ERIGON_QA_PATH: /home/qarunner/erigon-qa
2122
WORKING_TIME_SECONDS: 600
@@ -24,16 +25,6 @@ jobs:
2425
- name: Check out repository
2526
uses: actions/checkout@v4
2627

27-
- name: Set up Go
28-
uses: actions/setup-go@v4
29-
with:
30-
go-version: '1.21'
31-
32-
- name: Restore Erigon Testbed Data Directory
33-
run: |
34-
rm -rf $ERIGON_TESTBED_DATA_DIR/chaindata
35-
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
36-
3728
- name: Clean Erigon Build Directory
3829
run: |
3930
make clean
@@ -47,6 +38,10 @@ jobs:
4738
run: |
4839
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true
4940
41+
- name: Restore Erigon Testbed Data Directory
42+
run: |
43+
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
44+
5045
- name: Run Erigon, send ctrl-c and check for clean exiting
5146
id: test_step
5247
run: |
@@ -57,14 +52,15 @@ jobs:
5752
5853
# Capture monitoring script exit status
5954
test_exit_status=$?
55+
56+
# Save the subsection reached status
57+
echo "::set-output name=test_executed::true"
6058

6159
# Clean up Erigon process if it's still running
6260
if kill -0 $ERIGON_PID 2> /dev/null; then
6361
echo "Terminating Erigon"
6462
kill $ERIGON_PID
6563
wait $ERIGON_PID
66-
else
67-
echo "Erigon has already terminated"
6864
fi
6965

7066
# Check test runner script exit status
@@ -76,18 +72,23 @@ jobs:
7672
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
7773
fi
7874

75+
- name: Delete Erigon Testbed Data Directory
76+
if: always()
77+
run: |
78+
rm -rf $ERIGON_TESTBED_DATA_DIR
79+
7980
- name: Resume the Erigon instance dedicated to db maintenance
8081
run: |
8182
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
8283
8384
- name: Save test results
84-
if: always()
85+
if: steps.test_step.outputs.test_executed == 'true'
8586
env:
8687
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
8788
run: python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo erigon --commit $(git rev-parse HEAD) --test_name clean-exit-block-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json
8889

8990
- name: Upload test results
90-
if: always()
91+
if: steps.test_step.outputs.test_executed == 'true'
9192
uses: actions/upload-artifact@v4
9293
with:
9394
name: test-results

.github/workflows/qa-clean-exit-snapshot-downloading.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- 'release/**'
1212
types:
1313
- ready_for_review
14+
workflow_dispatch: # Run manually
1415

1516
jobs:
1617
long-running-test:
@@ -24,14 +25,10 @@ jobs:
2425
- name: Check out repository
2526
uses: actions/checkout@v4
2627

27-
- name: Set up Go
28-
uses: actions/setup-go@v4
29-
with:
30-
go-version: '1.21'
31-
32-
- name: Clean Erigon Build Directory
28+
- name: Clean Erigon Build & Data Directories
3329
run: |
3430
make clean
31+
rm -rf $ERIGON_DATA_DIR
3532
3633
- name: Build Erigon
3734
run: |
@@ -53,18 +50,16 @@ jobs:
5350
# Capture monitoring script exit status
5451
test_exit_status=$?
5552

53+
# Save the subsection reached status
54+
echo "::set-output name=test_executed::true"
55+
5656
# Clean up Erigon process if it's still running
5757
if kill -0 $ERIGON_PID 2> /dev/null; then
5858
echo "Terminating Erigon"
5959
kill $ERIGON_PID
6060
wait $ERIGON_PID
61-
else
62-
echo "Erigon has already terminated"
6361
fi
6462

65-
# Clean up Erigon build and data directories
66-
rm -rf $ERIGON_DATA_DIR
67-
6863
# Check test runner script exit status
6964
if [ $test_exit_status -eq 0 ]; then
7065
echo "Tests completed successfully"
@@ -74,18 +69,23 @@ jobs:
7469
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
7570
fi
7671

72+
- name: Clean up Erigon data directory
73+
if: always()
74+
run: |
75+
rm -rf $ERIGON_DATA_DIR
76+
7777
- name: Resume the Erigon instance dedicated to db maintenance
7878
run: |
7979
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
8080
8181
- name: Save test results
82-
if: always()
82+
if: steps.test_step.outputs.test_executed == 'true'
8383
env:
8484
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
8585
run: python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo erigon --commit $(git rev-parse HEAD) --test_name clean-exit-snapshot-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json
8686

8787
- name: Upload test results
88-
if: always()
88+
if: steps.test_step.outputs.test_executed == 'true'
8989
uses: actions/upload-artifact@v4
9090
with:
9191
name: test-results

0 commit comments

Comments
 (0)