Skip to content

Commit cf78d6f

Browse files
feat(ci): add hive consume test workflow (#1692)
Co-authored-by: danceratopz <[email protected]>
1 parent 916ddbb commit cf78d6f

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Hive Consume Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'forks/**'
7+
pull_request:
8+
paths:
9+
- '.github/workflows/hive-consume.yaml'
10+
- 'packages/testing/src/execution_testing/cli/pytest_commands/consume.py'
11+
- 'packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-consume.ini'
12+
- 'packages/testing/src/execution_testing/cli/pytest_commands/plugins/consume/**'
13+
- 'packages/testing/src/execution_testing/cli/pytest_commands/plugins/pytest_hive/**'
14+
- 'packages/testing/src/execution_testing/fixtures/consume.py'
15+
- 'packages/testing/src/execution_testing/rpc/**'
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: hive-consume-${{ github.workflow }}-${{ github.ref || github.run_id }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
test-hive:
24+
name: ${{ matrix.name }}
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: true
28+
matrix:
29+
include:
30+
- name: consume-engine
31+
mode: simulator
32+
simulator: ethereum/eels/consume-engine
33+
- name: consume-rlp
34+
mode: simulator
35+
simulator: ethereum/eels/consume-rlp
36+
- name: consume-sync
37+
mode: simulator
38+
simulator: ethereum/eels/consume-sync
39+
- name: dev-mode
40+
mode: dev
41+
consume_command: engine
42+
steps:
43+
- name: Checkout execution-specs
44+
if: matrix.mode == 'dev'
45+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
46+
with:
47+
path: execution-specs
48+
49+
- name: Checkout Hive
50+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
51+
with:
52+
repository: ethereum/hive
53+
ref: master
54+
path: hive
55+
56+
- name: Setup go env and cache
57+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
58+
with:
59+
go-version: '>=1.24'
60+
cache-dependency-path: hive/go.sum
61+
62+
- name: Install uv and python
63+
if: matrix.mode == 'dev'
64+
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
65+
with:
66+
enable-cache: true
67+
cache-dependency-glob: "execution-specs/uv.lock"
68+
version: ${{ vars.UV_VERSION }}
69+
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}
70+
71+
- name: Pre-pull geth docker image
72+
run: docker pull docker.ethquokkaops.io/dh/ethpandaops/geth:master
73+
74+
- name: Create clients.yaml
75+
run: |
76+
cat > hive/clients.yaml << 'EOF'
77+
- client: go-ethereum
78+
nametag: default
79+
build_args:
80+
baseimage: docker.ethquokkaops.io/dh/ethpandaops/geth
81+
tag: master
82+
EOF
83+
84+
- name: Build hive
85+
run: |
86+
cd hive
87+
go build .
88+
89+
- name: Run simulator tests
90+
if: matrix.mode == 'simulator'
91+
run: |
92+
cd hive
93+
./hive --sim '${{ matrix.simulator }}' \
94+
--sim.parallelism=1 \
95+
--client go-ethereum \
96+
--client-file clients.yaml \
97+
--sim.buildarg [email protected] \
98+
--sim.limit=".*test_block_at_rlp_limit_with_logs.*Osaka.*" \
99+
--docker.output
100+
101+
- name: Start Hive in dev mode
102+
if: matrix.mode == 'dev'
103+
run: |
104+
cd hive
105+
./hive --dev --client go-ethereum --client-file clients.yaml --docker.output &
106+
echo "Waiting for Hive to be ready..."
107+
for i in {1..30}; do
108+
if curl -s http://127.0.0.1:3000 > /dev/null 2>&1; then
109+
echo "Hive is ready!"
110+
break
111+
fi
112+
echo "Waiting... ($i/30)"
113+
sleep 2
114+
done
115+
116+
- name: Run consume in dev mode
117+
if: matrix.mode == 'dev'
118+
working-directory: execution-specs
119+
env:
120+
HIVE_SIMULATOR: http://127.0.0.1:3000
121+
run: |
122+
uv sync --all-extras
123+
uv run consume ${{ matrix.consume_command }} --input [email protected] -k "Osaka and test_block_at_rlp_limit_with_logs"

0 commit comments

Comments
 (0)