Add e2e sync tests to CI (#7530)

This PR adds the following sync tests to CI workflow - triggered when a PR is labeled `syncing` - to ensure we have some e2e coverage on basic sync scenarios:
- [x] checkpoint sync to a live network (covers range and backfill sync for _current_ fork)
- [x] checkpoint sync to a running devnet (covers range and backfill sync for _next_ fork)

It seems to work fine running on github hosted runners - but if performance become an issue we could switch to using self hosted runners for sepolia sync test. (standard CPU runners have 4 CPU, 16 GB ram - i think it _should_ be enough on sepolia / devnet networks)

The following tests have been **removed** from this PR and moved to a separate issue *(#7550)
- [x] genesis sync on a local devnet (covers current and next fork)
- [x] brief shutdown and restart (covers lookup sync)
- [x] longer shutdown and restart (covers range sync)

I'm hoping to keep these e2e test maintenance effort to a minimum - hopefully longer term we could have some generic e2e tests that works for all clients and the maintenance effort can be spread across teams.

### Latest test run:
https://github.com/sigp/lighthouse/actions/runs/15411744248

### Results:
<img width="687" alt="image" src="https://github.com/user-attachments/assets/c7178291-7b39-4f3b-a339-d3715eb16081" />
<img width="693" alt="image" src="https://github.com/user-attachments/assets/a8fc3520-296c-4baf-ae1e-1e887e660a3c" />

#### logs are available as artifacts:
<img width="629" alt="image" src="https://github.com/user-attachments/assets/3c0e1cd7-9c94-4d0c-be62-5e45179ab8f3" />
This commit is contained in:
Jimmy Chen
2025-06-05 18:31:55 +10:00
committed by GitHub
parent dcee76c0dc
commit 9a4972053e
5 changed files with 213 additions and 2 deletions

View File

@@ -67,6 +67,7 @@ jobs:
working-directory: scripts/local_testnet
- name: Upload logs artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-local-testnet
@@ -125,6 +126,7 @@ jobs:
working-directory: scripts/tests
- name: Upload logs artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-doppelganger-protection-success
@@ -160,6 +162,7 @@ jobs:
working-directory: scripts/tests
- name: Upload logs artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-doppelganger-protection-failure
@@ -167,6 +170,48 @@ jobs:
scripts/local_testnet/logs
retention-days: 3
# Tests checkpoint syncing to a live network (current fork) and a running devnet (usually next scheduled fork)
checkpoint-sync-test:
name: checkpoint-sync-test-${{ matrix.network }}
runs-on: ubuntu-latest
needs: dockerfile-ubuntu
if: contains(github.event.pull_request.labels.*.name, 'syncing')
continue-on-error: true
strategy:
matrix:
network: [sepolia, devnet]
steps:
- uses: actions/checkout@v4
- name: Install Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install -y kurtosis-cli
kurtosis analytics disable
- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
name: lighthouse-docker
path: .
- name: Load Docker image
run: docker load -i lighthouse-docker.tar
- name: Run the checkpoint sync test script
run: |
./checkpoint-sync.sh "sync-${{ matrix.network }}" "checkpoint-sync-config-${{ matrix.network }}.yaml"
working-directory: scripts/tests
- name: Upload logs artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-checkpoint-sync-${{ matrix.network }}
path: |
scripts/local_testnet/logs
retention-days: 3
# This job succeeds ONLY IF all others succeed. It is used by the merge queue to determine whether
# a PR is safe to merge. New jobs should be added here.
@@ -182,4 +227,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check that success job is dependent on all others
run: ./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success
run: |
exclude_jobs='checkpoint-sync-test'
./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"