Skip to content

Commit

Permalink
Merge branch 'node-real:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
harshsingh-cs authored May 27, 2024
2 parents 9d40d68 + 8a68894 commit f4908f7
Show file tree
Hide file tree
Showing 701 changed files with 39,286 additions and 28,470 deletions.
84 changes: 47 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.21'
Expand All @@ -57,7 +59,7 @@ jobs:
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.1
version: v1.57.2
skip-build-cache: true
args: --help

Expand All @@ -72,42 +74,50 @@ jobs:
- name: Test
run: make test

# tests-windows:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# strategy:
# matrix:
# os: [ windows-2022 ]
# runs-on: ${{ matrix.os }}
#
# steps:
# - name: configure Pagefile
# uses: al-cheb/[email protected]
# with:
# minimum-size: 8GB
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v4
# with:
# go-version: '1.21'
#
# - uses: actions/cache@v3
# with:
# path: |
# C:\ProgramData\chocolatey\lib\mingw
# C:\ProgramData\chocolatey\lib\cmake
# key: chocolatey-${{ matrix.os }}
# - name: Install dependencies
# run: |
# choco upgrade mingw -y --no-progress --version 13.2.0
# choco install cmake -y --no-progress --version 3.27.8
#
# - name: Build
# run: .\wmake.ps1 all
#
# - name: Test
# run: .\wmake.ps1 test
#
# - name: Test erigon-lib
# run: cd erigon-lib && make test-no-fuzz
- name: SonarCloud
if: runner.os == 'Linux'
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true

# tests-windows:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# strategy:
# matrix:
# os: [ windows-2022 ]
# runs-on: ${{ matrix.os }}

# steps:
# - name: configure Pagefile
# uses: al-cheb/[email protected]
# with:
# minimum-size: 8GB
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v4
# with:
# go-version: '1.21'

# - uses: actions/cache@v3
# with:
# path: |
# C:\ProgramData\chocolatey\lib\mingw
# C:\ProgramData\chocolatey\lib\cmake
# key: chocolatey-${{ matrix.os }}
# - name: Install dependencies
# run: |
# choco upgrade mingw -y --no-progress --version 13.2.0
# choco install cmake -y --no-progress --version 3.27.8

# - name: Build
# run: .\wmake.ps1 all

# - name: Test
# run: .\wmake.ps1 test

# - name: Test erigon-lib
# run: cd erigon-lib && make test-no-fuzz

docker-build-check:
# don't run this on devel - the PR must have run it to be merged and it misleads that this pushes the docker image
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/coverage.yml

This file was deleted.

35 changes: 18 additions & 17 deletions .github/workflows/qa-clean-exit-block-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ name: QA - Clean exit (block downloading)
on:
push:
branches:
- 'release/**'
- 'release/2.*'
pull_request:
branches:
- main
- 'release/**'
types:
- ready_for_review
workflow_dispatch: # Run manually

jobs:
long-running-test:
runs-on: self-hosted
runs-on: [self-hosted, Erigon2]
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-release/datadir
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
ERIGON_QA_PATH: /home/qarunner/erigon-qa
WORKING_TIME_SECONDS: 600
Expand All @@ -24,16 +25,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Restore Erigon Testbed Data Directory
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR/chaindata
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
- name: Clean Erigon Build Directory
run: |
make clean
Expand All @@ -47,6 +38,10 @@ jobs:
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true
- name: Restore Erigon Testbed Data Directory
run: |
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
- name: Run Erigon, send ctrl-c and check for clean exiting
id: test_step
run: |
Expand All @@ -57,14 +52,15 @@ jobs:
# Capture monitoring script exit status
test_exit_status=$?

# Save the subsection reached status
echo "::set-output name=test_executed::true"

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

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

- name: Delete Erigon Testbed Data Directory
if: always()
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR
- name: Resume the Erigon instance dedicated to db maintenance
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
- name: Save test results
if: always()
if: 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) --test_name clean-exit-block-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json

- name: Upload test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
uses: actions/upload-artifact@v4
with:
name: test-results
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/qa-clean-exit-snapshot-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'release/**'
types:
- ready_for_review
workflow_dispatch: # Run manually

jobs:
long-running-test:
Expand All @@ -24,14 +25,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Clean Erigon Build Directory
- name: Clean Erigon Build & Data Directories
run: |
make clean
rm -rf $ERIGON_DATA_DIR
- name: Build Erigon
run: |
Expand All @@ -53,18 +50,16 @@ jobs:
# Capture monitoring script exit status
test_exit_status=$?

# Save the subsection reached status
echo "::set-output name=test_executed::true"

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

# Clean up Erigon build and data directories
rm -rf $ERIGON_DATA_DIR

# Check test runner script exit status
if [ $test_exit_status -eq 0 ]; then
echo "Tests completed successfully"
Expand All @@ -74,18 +69,23 @@ jobs:
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
fi

- name: Clean up Erigon data directory
if: always()
run: |
rm -rf $ERIGON_DATA_DIR
- name: Resume the Erigon instance dedicated to db maintenance
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
- name: Save test results
if: always()
if: 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) --test_name clean-exit-snapshot-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json

- name: Upload test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
uses: actions/upload-artifact@v4
with:
name: test-results
Expand Down
Loading

0 comments on commit f4908f7

Please sign in to comment.