diff --git a/.github/relay-values.yml b/.github/relay-values.yml new file mode 100644 index 000000000..15c76d7ea --- /dev/null +++ b/.github/relay-values.yml @@ -0,0 +1,3 @@ +relay: + config: + DEBUG_API_ENABLED: "true" diff --git a/.github/scripts/forward-ports.sh b/.github/scripts/forward-ports.sh new file mode 100755 index 000000000..7eb7c70c7 --- /dev/null +++ b/.github/scripts/forward-ports.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Built-in SOLO port forwarding does not work :/ +# Port forwarding stops shortly after a one-shot Falcon start in GitHub actions. +# For this reason, we use this script to start port forwarding directly via Bash, +# instead of relying on the Node.js script. +# This approach keeps the connection stable and ensures it lasts throughout the tests. + +FORWARDS=( + "mirror-1-rest|5551" + "network-node1|50211" + "relay-1|7546" + "mirror-1-grpc|5600" +) + +ps aux | grep "port-forward" | grep kubectl | awk '{print $2}' | xargs -r kill -9 +NS="$(kubectl get ns -o name | sed 's|^namespace/||' | grep '^solo' | grep -v '^solo-setup$' | head -n1)" + +listen() { + local pod="$1" + local port="$2" + ( + while true; do + if ! ps aux | grep -F kubectl | grep -F port-forward | grep -F " ${port}:${port}" | grep -v grep >/dev/null; then + kubectl port-forward "$pod" -n "$NS" "${port}:${port}" >/dev/null 2>&1 & + fi + sleep 1 + done + ) & +} + +for row in "${FORWARDS[@]}"; do + IFS='|' read -r include port <<<"$row" + POD="$(kubectl get pods -A --no-headers | grep -E "$include" | head -n 1 | awk '{print $2}' | head -n1)" + listen "$POD" "$port" +done diff --git a/.github/workflows/erc-registry-test.yml b/.github/workflows/erc-registry-test.yml index 4babfa023..9d0a23b3f 100644 --- a/.github/workflows/erc-registry-test.yml +++ b/.github/workflows/erc-registry-test.yml @@ -46,15 +46,55 @@ jobs: cd ${{env.INDEXER_PATH}} npm run test:unit - - name: Start the local node - run: npx hedera start -d --verbose=trace - timeout-minutes: 5 + - name: Generate falcon-values config file + run: | + cat > .github/falcon.yml < .github/initial.yml < .github/target.yml < .github/falcon.yml < .github/falcon.yml <