-
Notifications
You must be signed in to change notification settings - Fork 16
102 lines (88 loc) · 3.39 KB
/
smoke-test.yaml
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
name: Smoke Test
on:
pull_request:
jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build xatu image
run: |
docker build -t ethpandaops/xatu:local .
echo "Xatu image is built."
- 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 kurtosis-cli
- name: Create Kurtosis config file
run: |
cat <<EOF > network_params.yaml
participants:
- el_client_type: geth
cl_client_type: teku
- el_client_type: nethermind
cl_client_type: prysm
- el_client_type: erigon
cl_client_type: lighthouse
- el_client_type: besu
cl_client_type: lighthouse
- el_client_type: reth
cl_client_type: lodestar
- el_client_type: ethereumjs
cl_client_type: nimbus
additional_services: []
network_parans:
genesis_delay: 180
xatu_sentry_enabled: true
xatu_sentry_params:
xatu_server_addr: xatu-server:8080
xatu_sentry_image: ethpandaops/xatu:local
<<EOF
- name: Start Ethereum network with Kurtosis
timeout-minutes: 10
shell: bash
run: |
echo "Starting Kurtosis..."
kurtosis run --enclave xatu github.com/kurtosis-tech/ethereum-package --args-file network_params.yaml;
echo "Kurtosis has started successfully."
- name: Run Xatu stack
timeout-minutes: 10
shell: bash
run: |
echo "Starting Xatu stack..."
docker compose up --detach --quiet-pull
echo "Xatu stack has started successfully."
- name: Add all xatu-sentry containers to the xatu network
run: |
for container in $(docker ps --filter name=xatu-sentry --format "{{.Names}}"); do docker network connect xatu_xatu-net $container; done
- name: Verify Clickhouse has data from all sentries
timeout-minutes: 10
run: |
echo "Checking Clickhouse for data from all sentries"
all_sentries=($(kurtosis enclave inspect xatu | grep cl- | grep http | awk '{ print $2 }' | grep -v validator | sed 's/^cl-//'))
tables=(
"beacon_api_eth_v1_events_attestation"
"beacon_api_eth_v1_events_block"
"beacon_api_eth_v1_events_head"
)
for table in "${tables[@]}"; do
echo "Checking $table table..."
for sentry in "${all_sentries[@]}"; do
echo "Checking $table table for $sentry..."
while true; do
data_count=$(docker exec clickhouse-01 clickhouse-client --query "SELECT COUNT(*) FROM default.$table WHERE meta_client_name = '$sentry'" || true)
if [[ $data_count -gt 0 ]]; then
echo "$table table has data from $sentry."
break
else
echo "$table table data count for $sentry is $data_count. Checking again in 2 seconds..."
sleep 2
fi
done
done
done
# - name: Dump docker logs on failure
# if: always()
# uses: jwalton/gh-docker-logs@v2