Skip to content

Commit 6fee20b

Browse files
authored
Merge pull request #56 from gnosischain/feat/update-docs-and-workflows
Feat/update docs and workflows
2 parents 9d1c0ca + 2e54f35 commit 6fee20b

File tree

4 files changed

+535
-0
lines changed

4 files changed

+535
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Debug Gnosis Tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
client:
7+
description: "Client"
8+
required: true
9+
default: "nethermind-gnosis"
10+
type: choice
11+
options:
12+
- nethermind-gnosis
13+
- erigon-gnosis
14+
- reth-gnosis
15+
- go-ethereum-gnosis
16+
suite:
17+
description: "Suite to run"
18+
required: true
19+
default: "withdrawals"
20+
type: choice
21+
options:
22+
- ""
23+
- withdrawals
24+
- cancun
25+
- engine-api
26+
- engine-auth
27+
- engine-exchange-capabilities
28+
- network
29+
branch:
30+
description: "Branch to run tests on"
31+
required: true
32+
default: "master"
33+
simulator:
34+
description: "Hive simulator"
35+
required: true
36+
default: "ethereum/gnosis-engine-jq"
37+
type: choice
38+
options:
39+
- ethereum/gnosis-engine-jq
40+
- smoke
41+
parallelism:
42+
description: "Parallelism"
43+
required: true
44+
default: "1"
45+
type: number
46+
min: 1
47+
max: 10
48+
hive_ttd_enabled:
49+
description: "Hive TTD Enabled"
50+
required: true
51+
default: "true"
52+
type: boolean
53+
log_level:
54+
description: "Log level"
55+
default: "5"
56+
type: number
57+
min: 1
58+
max: 5
59+
sim_log_level:
60+
description: "Simulator log level"
61+
default: "5"
62+
type: number
63+
min: 1
64+
max: 5
65+
client_check_time_limit:
66+
description: "Single test timeout"
67+
default: "10m"
68+
type: string
69+
70+
jobs:
71+
hive-run:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Set up Go
75+
uses: actions/setup-go@v4
76+
with:
77+
go-version: stable
78+
79+
- name: Set up QEMU
80+
uses: docker/setup-qemu-action@v2
81+
82+
- name: Set up Docker Buildx
83+
uses: docker/setup-buildx-action@v2
84+
85+
- name: Install Linux packages
86+
run: |
87+
sudo apt-get update
88+
sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential
89+
90+
- name: Checkout code
91+
uses: actions/checkout@v2
92+
with:
93+
ref: ${{ github.event.inputs.branch }}
94+
95+
- name: Download dependencies
96+
run: go get -v ./...
97+
98+
- name: Build hive
99+
run: go build -v -o hive hive.go
100+
101+
- name: Run tests
102+
continue-on-error: true
103+
run: |
104+
HIVE_TTD_ENABLED=${{ github.event.inputs.hive_ttd_enabled }} ./hive --sim "${{ github.event.inputs.simulator }}" --sim.limit="${{ github.event.inputs.suite }}" --client "${{ github.event.inputs.client }}" --results-root=${{ github.workspace }}/runs --sim.loglevel=${{ github.event.inputs.sim_log_level }} --loglevel=${{ github.event.inputs.log_level }} --client.checktimelimit=${{ github.event.inputs.client_check_time_limit }} --docker.output --sim.parallelism=${{ github.event.inputs.parallelism }}
105+
106+
- name: Send file over SSH
107+
if: always()
108+
uses: appleboy/scp-action@master
109+
with:
110+
host: ${{ secrets.SSH_HOST }}
111+
username: ${{ secrets.SSH_USERNAME }}
112+
key: ${{ secrets.SSH_KEY }}
113+
port: ${{ secrets.SSH_PORT }}
114+
source: ${{ github.workspace }}/runs/*
115+
target: ${{ secrets.DIR }}/
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Debug Gnosis Tests (detailed)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
baseimage:
7+
description: "Base image"
8+
required: true
9+
default: "nethermindeth/nethermind"
10+
type: string
11+
tag:
12+
description: "Client docker image tag"
13+
required: true
14+
default: "master"
15+
type: string
16+
client:
17+
description: "Client"
18+
required: true
19+
default: "nethermind-gnosis"
20+
type: choice
21+
options:
22+
- nethermind-gnosis
23+
- erigon-gnosis
24+
- reth-gnosis
25+
- go-ethereum-gnosis
26+
suite:
27+
description: "Suite to run. Could be any of the following: withdrawals cancun engine-api engine-auth engine-exchange-capabilities network. To run a single test, use the test name started from '/' (e.g. '/Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org Sync')"
28+
required: true
29+
default: "withdrawals"
30+
type: string
31+
branch:
32+
description: "Branch to run tests on"
33+
required: true
34+
default: "master"
35+
simulator:
36+
description: "Hive simulator"
37+
required: true
38+
default: "ethereum/gnosis-engine-jq"
39+
type: choice
40+
options:
41+
- ethereum/gnosis-engine-jq
42+
- smoke
43+
parallelism:
44+
description: "Parallelism"
45+
required: true
46+
default: "1"
47+
type: number
48+
min: 1
49+
max: 10
50+
hive_ttd_enabled:
51+
description: "Hive TTD Enabled"
52+
required: true
53+
default: "true"
54+
type: boolean
55+
log_level:
56+
description: "Log level"
57+
default: "5"
58+
type: number
59+
min: 1
60+
max: 5
61+
sim_log_level:
62+
description: "Simulator log level"
63+
default: "5"
64+
type: number
65+
min: 1
66+
max: 5
67+
68+
jobs:
69+
hive-run:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Set up Go
73+
uses: actions/setup-go@v4
74+
with:
75+
go-version: stable
76+
77+
- name: Set up QEMU
78+
uses: docker/setup-qemu-action@v2
79+
80+
- name: Set up Docker Buildx
81+
uses: docker/setup-buildx-action@v2
82+
83+
- name: Install Linux packages
84+
run: |
85+
sudo apt-get update
86+
sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential
87+
88+
- name: Checkout code
89+
uses: actions/checkout@v2
90+
with:
91+
ref: ${{ github.event.inputs.branch }}
92+
93+
- name: Download dependencies
94+
run: go get -v ./...
95+
96+
- name: Build hive
97+
run: go build -v -o hive hive.go
98+
99+
- name: Patch Hive Dockerfile
100+
run: |
101+
tag=${{ github.event.inputs.tag }}
102+
client=${{ github.event.inputs.client }}
103+
baseimage=${{ github.event.inputs.baseimage }}
104+
ls -la
105+
sed -i \
106+
-e "s|client: custom_client|client: $client|" \
107+
-e "s|baseimage: custom_image|baseimage: $baseimage|" \
108+
-e "s|tag: custom_tag|tag: $tag|" \
109+
configs/generic.yml
110+
cat configs/generic.yml
111+
112+
- name: Run tests
113+
continue-on-error: true
114+
run: |
115+
HIVE_TTD_ENABLED=${{ github.event.inputs.hive_ttd_enabled }} ./hive --sim "${{ github.event.inputs.simulator }}" --sim.limit="${{ github.event.inputs.suite }}" --client-file configs/generic.yml --results-root=${{ github.workspace }}/runs --sim.loglevel=${{ github.event.inputs.sim_log_level }} --loglevel=${{ github.event.inputs.log_level }} --client.checktimelimit=20m --docker.output --sim.parallelism=${{ github.event.inputs.parallelism }}
116+
117+
- name: Send file over SSH
118+
if: always()
119+
uses: appleboy/scp-action@master
120+
with:
121+
host: ${{ secrets.SSH_HOST }}
122+
username: ${{ secrets.SSH_USERNAME }}
123+
key: ${{ secrets.SSH_KEY }}
124+
port: ${{ secrets.SSH_PORT }}
125+
source: ${{ github.workspace }}/runs/*
126+
target: ${{ secrets.DIR }}/
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: Daily Run Gnosis
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Run every day at 00:00 UTC
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: "Branch to run tests on"
10+
required: true
11+
default: "master"
12+
push:
13+
branches:
14+
- master
15+
pull_request:
16+
branches:
17+
- master
18+
types: [ closed ]
19+
20+
jobs:
21+
hive-run:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- client: nethermind-gnosis
28+
simulator: 'ethereum/gnosis-engine-jq'
29+
suite: 'withdrawals'
30+
parallelism: 8
31+
- client: erigon-gnosis
32+
simulator: 'ethereum/gnosis-engine-jq'
33+
suite: 'withdrawals'
34+
parallelism: 8
35+
- client: reth-gnosis
36+
simulator: 'ethereum/gnosis-engine-jq'
37+
suite: 'withdrawals'
38+
parallelism: 8
39+
- client: go-ethereum-gnosis
40+
simulator: 'ethereum/gnosis-engine-jq'
41+
suite: 'withdrawals'
42+
parallelism: 8
43+
- client: nethermind-gnosis
44+
simulator: 'ethereum/gnosis-engine-jq'
45+
suite: 'cancun'
46+
parallelism: 8
47+
- client: erigon-gnosis
48+
simulator: 'ethereum/gnosis-engine-jq'
49+
suite: 'cancun'
50+
parallelism: 8
51+
- client: reth-gnosis
52+
simulator: 'ethereum/gnosis-engine-jq'
53+
suite: 'cancun'
54+
parallelism: 8
55+
- client: go-ethereum-gnosis
56+
simulator: 'ethereum/gnosis-engine-jq'
57+
suite: 'cancun'
58+
parallelism: 8
59+
- client: nethermind-gnosis
60+
simulator: 'ethereum/gnosis-engine-jq'
61+
suite: 'engine-api'
62+
parallelism: 10
63+
- client: erigon-gnosis
64+
simulator: 'ethereum/gnosis-engine-jq'
65+
suite: 'engine-api'
66+
parallelism: 12
67+
- client: reth-gnosis
68+
simulator: 'ethereum/gnosis-engine-jq'
69+
suite: 'engine-api'
70+
parallelism: 12
71+
- client: go-ethereum-gnosis
72+
simulator: 'ethereum/gnosis-engine-jq'
73+
suite: 'engine-api'
74+
parallelism: 12
75+
- client: nethermind-gnosis
76+
simulator: 'ethereum/gnosis-engine-jq'
77+
suite: 'engine-auth'
78+
parallelism: 1
79+
- client: nethermind-gnosis
80+
simulator: 'ethereum/gnosis-engine-jq'
81+
suite: 'engine-exchange-capabilities'
82+
parallelism: 1
83+
- client: erigon-gnosis
84+
simulator: 'ethereum/gnosis-engine-jq'
85+
suite: 'engine-exchange-capabilities'
86+
parallelism: 1
87+
- client: reth-gnosis
88+
simulator: 'ethereum/gnosis-engine-jq'
89+
suite: 'engine-exchange-capabilities'
90+
parallelism: 1
91+
- client: go-ethereum-gnosis
92+
simulator: 'ethereum/gnosis-engine-jq'
93+
suite: 'engine-exchange-capabilities'
94+
parallelism: 1
95+
- client: nethermind-gnosis
96+
simulator: 'smoke'
97+
suite: 'network'
98+
parallelism: 1
99+
- client: reth-gnosis
100+
simulator: 'smoke'
101+
suite: 'network'
102+
parallelism: 1
103+
steps:
104+
- name: Set up Go
105+
uses: actions/setup-go@v5
106+
with:
107+
go-version: stable
108+
109+
- name: Set up QEMU
110+
uses: docker/setup-qemu-action@v3
111+
112+
- name: Set up Docker Buildx
113+
uses: docker/setup-buildx-action@v3
114+
115+
- name: Install Linux packages
116+
run: |
117+
sudo apt-get update
118+
sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential
119+
120+
- name: Checkout code
121+
uses: actions/checkout@v4
122+
with:
123+
ref: ${{ github.event.inputs.branch || 'master' }}
124+
125+
- name: Download dependencies
126+
run: go get -v ./...
127+
128+
- name: Build hive
129+
run: go build -v -o hive hive.go
130+
131+
- name: Run tests
132+
continue-on-error: true
133+
run: |
134+
HIVE_TTD_ENABLED=false ./hive --sim "${{ matrix.simulator }}" --sim.limit="${{ matrix.suite }}" --client "${{ matrix.client }}" --results-root=${{ github.workspace }}/${{ github.run_id }}/runs --loglevel=3 --sim.loglevel=3 --client.checktimelimit=10m --docker.output --sim.parallelism=${{ matrix.parallelism }}
135+
136+
- name: Check report
137+
run: ls -la ${{ github.workspace }}/${{ github.run_id }}/runs
138+
139+
- name: Send file over SSH
140+
if: always()
141+
uses: appleboy/scp-action@master
142+
with:
143+
host: ${{ secrets.SSH_HOST }}
144+
username: ${{ secrets.SSH_USERNAME }}
145+
key: ${{ secrets.SSH_KEY }}
146+
port: ${{ secrets.SSH_PORT }}
147+
source: ${{ github.run_id }}/runs/*
148+
target: ${{ secrets.DIR }}/github/workspace/runs/
149+
strip_components: 2

0 commit comments

Comments
 (0)