Commit 8ef5c57f authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

feat: add assertoor test for per PR CI job (#537)

parent 49145316
participants:
- el_type: geth
cl_type: teku
- el_type: nethermind
cl_type: prysm
- el_type: erigon
cl_type: nimbus
- el_type: besu
cl_type: lighthouse
- el_type: reth
cl_type: lodestar
- el_type: nimbus
cl_type: grandine
additional_services:
- assertoor
assertoor_params:
run_stability_check: false
run_block_proposal_check: true
...@@ -66,3 +66,54 @@ jobs: ...@@ -66,3 +66,54 @@ jobs:
- name: Kurtosis Lint - name: Kurtosis Lint
run: kurtosis lint ${{ github.workspace }} run: kurtosis lint ${{ github.workspace }}
assertoor:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup 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
kurtosis analytics disable
- name: Run Starlark
run: kurtosis run ${{ github.workspace }} --enclave assertoor-${{ github.run_id }} --args-file ./.github/tests/mix-assert.yaml --image-download always --non-blocking-tasks --verbosity DETAILED
- name: Assertoor Status Check
id: test_result
uses: ethpandaops/assertoor-github-action@v1
with:
kurtosis_enclave_name: "assertoor-${{ github.run_id }}"
- name: Return test result
shell: bash
run: |
test_result="${{ steps.test_result.outputs.result }}"
test_status=$(
cat <<"EOF"
${{ steps.test_result.outputs.test_overview }}
EOF
)
failed_test_status=$(
cat <<"EOF"
${{ steps.test_result.outputs.failed_test_details }}
EOF
)
echo "Test Result: $test_result"
echo "$test_status"
if ! [ "$test_result" == "success" ]; then
echo ""
echo "Failed Test Task Status:"
echo "$failed_test_status"
echo ""
echo "See 'Await test completion' task for detailed logs about this failure!"
echo ""
exit 1 # fail action
fi
...@@ -4,6 +4,7 @@ def new_cl_context( ...@@ -4,6 +4,7 @@ def new_cl_context(
beacon_http_url, beacon_http_url,
cl_nodes_metrics_info, cl_nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_grpc_url="",
multiaddr="", multiaddr="",
peer_id="", peer_id="",
snooper_enabled=False, snooper_enabled=False,
...@@ -16,6 +17,7 @@ def new_cl_context( ...@@ -16,6 +17,7 @@ def new_cl_context(
beacon_http_url=beacon_http_url, beacon_http_url=beacon_http_url,
cl_nodes_metrics_info=cl_nodes_metrics_info, cl_nodes_metrics_info=cl_nodes_metrics_info,
beacon_service_name=beacon_service_name, beacon_service_name=beacon_service_name,
beacon_grpc_url=beacon_grpc_url,
multiaddr=multiaddr, multiaddr=multiaddr,
peer_id=peer_id, peer_id=peer_id,
snooper_enabled=snooper_enabled, snooper_enabled=snooper_enabled,
......
...@@ -148,13 +148,9 @@ def launch( ...@@ -148,13 +148,9 @@ def launch(
beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID]
beacon_http_endpoint = "http://{0}:{1}".format( beacon_http_url = "http://{0}:{1}".format(beacon_service.ip_address, HTTP_PORT_NUM)
beacon_service.ip_address, HTTP_PORT_NUM beacon_grpc_url = "{0}:{1}".format(beacon_service.ip_address, RPC_PORT_NUM)
)
beacon_rpc_endpoint = "http://{0}:{1}".format(
beacon_service.ip_address, RPC_PORT_NUM
)
beacon_http_url = beacon_rpc_endpoint
# TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module
beacon_node_identity_recipe = GetHttpRequestRecipe( beacon_node_identity_recipe = GetHttpRequestRecipe(
endpoint="/eth/v1/node/identity", endpoint="/eth/v1/node/identity",
...@@ -187,6 +183,7 @@ def launch( ...@@ -187,6 +183,7 @@ def launch(
beacon_http_url, beacon_http_url,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_grpc_url,
beacon_multiaddr, beacon_multiaddr,
beacon_peer_id, beacon_peer_id,
snooper_enabled, snooper_enabled,
......
...@@ -36,15 +36,16 @@ def get_config( ...@@ -36,15 +36,16 @@ def get_config(
prysm_password_relative_filepath, prysm_password_relative_filepath,
) )
beacon_http_url = beacon_http_url[7:] # remove the "http://" if cl_context.client_name != constants.CL_TYPE.prysm:
beacon_grpc_url = beacon_http_url[7:] # remove the "http://" prefix
cmd = [ cmd = [
"--accept-terms-of-use=true", # it's mandatory in order to run the node "--accept-terms-of-use=true", # it's mandatory in order to run the node
"--chain-config-file=" "--chain-config-file="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--beacon-rpc-provider=" + beacon_http_url, "--beacon-rpc-provider=" + cl_context.beacon_grpc_url,
"--beacon-rest-api-provider=" + beacon_http_url, "--beacon-rest-api-provider=" + cl_context.beacon_grpc_url,
"--wallet-dir=" + validator_keys_dirpath, "--wallet-dir=" + validator_keys_dirpath,
"--wallet-password-file=" + validator_secrets_dirpath, "--wallet-password-file=" + validator_secrets_dirpath,
"--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment