Skip to content

Commit

Permalink
revert changes to network test
Browse files Browse the repository at this point in the history
  • Loading branch information
just-mitch committed Mar 6, 2025
1 parent 7746725 commit 697fbc0
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/network-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
runs-on: ubuntu-latest

env:
TEST_DOCKER_IMAGE: ${{ inputs.aztec_e2e_docker_image }}
NAMESPACE: ${{ inputs.namespace }}
TEST: ${{ inputs.test }}
CHART_PATH: ./spartan/aztec-network
CLUSTER_NAME: ${{ inputs.cluster }}
REGION: us-west1-a
PROJECT_ID: testnet-440309
Expand All @@ -40,18 +42,46 @@ jobs:
with:
install_components: gke-gcloud-auth-plugin

- name: Install GKE Auth Plugin
run: |
gcloud components install gke-gcloud-auth-plugin --quiet
- name: Configure kubectl with GKE cluster
run: |
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --region ${{ env.REGION }}
- name: Run test
run: |
# Find 3 free ports between 9000 and 10000
FREE_PORTS=$(comm -23 <(seq 9000 10000 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 3)
# Extract the free ports from the list
PXE_PORT=$(echo $FREE_PORTS | awk '{print $1}')
ANVIL_PORT=$(echo $FREE_PORTS | awk '{print $2}')
METRICS_PORT=$(echo $FREE_PORTS | awk '{print $3}')
export GRAFANA_PASSWORD=$(kubectl get secrets -n metrics metrics-grafana -o jsonpath='{.data.admin-password}' | base64 --decode)
gcloud config set project ${{ env.PROJECT_ID }}
./spartan/tests/upgrade.sh ${{ env.NAMESPACE }}
GCLOUD_CONFIG_DIR=$(gcloud info --format='value(config. paths. global_config_dir)')
echo "gcloud config dir: [$GCLOUD_CONFIG_DIR]"
docker run --rm --network=host \
-v ~/.kube:/root/.kube \
-v $GCLOUD_CONFIG_DIR:/root/.config/gcloud \
-e K8S=gcloud \
-e CLUSTER_NAME=${{ env.CLUSTER_NAME }} \
-e REGION=${{ env.REGION }} \
-e INSTANCE_NAME=${{ env.NAMESPACE }} \
-e SPARTAN_DIR="/usr/src/spartan" \
-e NAMESPACE=${{ env.NAMESPACE }} \
-e HOST_PXE_PORT=$PXE_PORT \
-e CONTAINER_PXE_PORT=8081 \
-e HOST_ETHEREUM_PORT=$ANVIL_PORT \
-e CONTAINER_ETHEREUM_PORT=8545 \
-e HOST_METRICS_PORT=$METRICS_PORT \
-e CONTAINER_METRICS_PORT=80 \
-e GRAFANA_PASSWORD=$GRAFANA_PASSWORD \
-e DEBUG="aztec:*" \
-e LOG_JSON=1 \
-e LOG_LEVEL=debug \
${{ env.TEST_DOCKER_IMAGE }} ${{ env.TEST }}

0 comments on commit 697fbc0

Please sign in to comment.