Skip to content

Commit

Permalink
fix: ci attempt 2 (#302)
Browse files Browse the repository at this point in the history
* test

* ci: improve additional services job

* test

* Revert "test"

This reverts commit c974ef7.

* test: add small delay to allow services to index

* Revert "test: add small delay to allow services to index"

This reverts commit aea343e.
  • Loading branch information
leovct authored Oct 7, 2024
1 parent abc7d5d commit 4a126c4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/tests/additional-services.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
args:
additional_services:
- arpeggio
#- arpeggio
#- blockscout # TODO: Find out why the blockcout backend doesn't start: https://github.com/xavier-romero/kurtosis-blockscout/issues/7
- blutgang
- erpc
Expand Down
64 changes: 46 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,33 +152,61 @@ jobs:
run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }}

- name: Verify Arpeggio RPC
run: cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} arpeggio-001 rpc)
run: |
result=$(yq '.args.additional_services | contains(["arpeggio"])' ./.github/tests/additional-services.yml)
if [ "$result" = "true" ]; then
cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} arpeggio-001 rpc)
else
echo "Arpeggio is not deployed."
fi
- name: Verify Blutgang RPC
run: cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} blutgang-001 http)
run: |
result=$(yq '.args.additional_services | contains(["blutgang"])' ./.github/tests/additional-services.yml)
if [ "$result" = "true" ]; then
cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} blutgang-001 http)
else
echo "Blutgang is not deployed."
fi
- name: Verify erpc RPC
run: cast bn --rpc-url "$(kurtosis port print ${{ env.ENCLAVE_NAME }} erpc-001 rpc)/main/evm/10101"
run: |
result=$(yq '.args.additional_services | contains(["erpc"])' ./.github/tests/additional-services.yml)
if [ "$result" = "true" ]; then
cast bn --rpc-url "$(kurtosis port print ${{ env.ENCLAVE_NAME }} erpc-001 rpc)/main/evm/10101"
else
echo "ERPC is not deployed."
fi
# zkevm-node doesn't work with fork12.
#- name: Verify permissionless zkevm-node rpc
# run: cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} zkevm-node-rpc-pless-001 rpc)
- name: Verify permissionless zkevm-node rpc
run: |
result=$(yq '.args.additional_services | contains(["pless_zkevm_node"])' ./.github/tests/additional-services.yml)
if [ "$result" = "true" ]; then
cast bn --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} zkevm-node-rpc-pless-001 rpc)
else
echo "Permissionless zkevm-node is not deployed."
fi
- name: Verify that Prometheus collects Panoptichain metrics
run: |
echo "Wait for one minute while Prometheus gathers metrics..."
sleep 60
echo "Retrieve Panoptichain metrics from Prometheus..."
panoptichain_metric="panoptichain_system_uptime"
prometheus_url=$(kurtosis port print ${{ env.ENCLAVE_NAME }} prometheus-001 http)
prometheus_query=$(curl "$prometheus_url/api/v1/query?query=$panoptichain_metric")
echo $prometheus_query | jq
if [ "$(jq -r '.data.result[0].metric.__name__' <<<$prometheus_query)" == "$panoptichain_metric" ]; then
echo "✅ Prometheus collects panoptichain metrics!"
result=$(yq '.args.additional_services | contains(["prometheus_grafana"])' ./.github/tests/additional-services.yml)
if [ "$result" = "true" ]; then
echo "Wait for one minute while Prometheus gathers metrics..."
sleep 60
echo "Retrieve Panoptichain metrics from Prometheus..."
panoptichain_metric="panoptichain_system_uptime"
prometheus_url=$(kurtosis port print ${{ env.ENCLAVE_NAME }} prometheus-001 http)
prometheus_query=$(curl "$prometheus_url/api/v1/query?query=$panoptichain_metric")
echo $prometheus_query | jq
if [ "$(jq -r '.data.result[0].metric.__name__' <<<$prometheus_query)" == "$panoptichain_metric" ]; then
echo "✅ Prometheus collects panoptichain metrics!"
else
echo "❌ Prometheus does not collect panoptichain metrics..."
exit 1
fi
else
echo "❌ Prometheus does not collect panoptichain metrics..."
exit 1
echo "Prometheus is not deployed."
fi
- name: Dump enclave logs
Expand Down

0 comments on commit 4a126c4

Please sign in to comment.