Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa-tests: updating test workflow on release/2.60 #10196

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/qa-clean-exit-block-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ name: QA - Clean exit (block downloading)
on:
push:
branches:
- 'release/**'
- main
- 'release/2.*'
pull_request:
branches:
- devel
- 'release/**'
- main
- 'release/2.*'
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-versions/reference-version/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
Expand Down Expand Up @@ -51,14 +53,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 @@ -71,6 +74,7 @@ jobs:
fi

- name: Delete Erigon Testbed Data Directory
if: always()
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR

Expand All @@ -79,13 +83,13 @@ jobs:
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
29 changes: 17 additions & 12 deletions .github/workflows/qa-clean-exit-snapshot-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: QA - Clean exit (snapshot downloading)
on:
push:
branches:
- devel
- 'release/**'
- main
- 'release/2.*'
pull_request:
branches:
- devel
- 'release/**'
- main
- 'release/2.*'
types:
- ready_for_review
workflow_dispatch: # Run manually

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

- 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 @@ -48,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 @@ -69,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
24 changes: 14 additions & 10 deletions .github/workflows/qa-snap-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
long-running-test:
runs-on: self-hosted
runs-on: [self-hosted, Erigon2]
env:
ERIGON_DATA_DIR: ${{ github.workspace }}/erigon_data
ERIGON_QA_PATH: /home/qarunner/erigon-qa
Expand All @@ -18,9 +18,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- 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 @@ -35,25 +36,23 @@ jobs:
id: test_step
run: |
set +e # Disable exit on error

# Run Erigon, monitor snapshot downloading and check logs
python3 $ERIGON_QA_PATH/test_system/qa-tests/snap-download/run_and_check_snap_download.py ${{ github.workspace }}/build/bin $ERIGON_DATA_DIR $TOTAL_TIME_SECONDS

# 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 @@ -63,18 +62,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 snap-download --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
15 changes: 9 additions & 6 deletions .github/workflows/qa-tip-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: QA - Tip tracking
on:
schedule:
- cron: '0 0 * * *' # Run every day at 00:00 AM UTC
workflow_dispatch: # Run manually

jobs:
long-running-test:
runs-on: self-hosted
runs-on: [self-hosted, Erigon2]
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
Expand All @@ -29,7 +30,7 @@ jobs:

- name: Pause the Erigon instance dedicated to db maintenance
run: |
curl -X POST -H "Accept: application/json" -d '{"status": "paused"}' http://localhost:8080/production/default/status || true
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true

- name: Restore Erigon Testbed Data Directory
run: |
Expand All @@ -48,13 +49,14 @@ 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 @@ -67,6 +69,7 @@ jobs:
fi

- name: Delete Erigon Testbed Data Directory
if: always()
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR

Expand All @@ -75,13 +78,13 @@ jobs:
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 tip-tracking --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