branch-dispatch #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test KubeRay Operator Upgrade to latest available helm image | |
| on: | |
| repository_dispatch: | |
| types: [branch-dispatch] | |
| jobs: | |
| run_kuberay_upgrade_tests: | |
| runs-on: kuberay-testing # target runner | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Clone KubeRay repository | |
| run: | | |
| git clone --depth=1 --branch dev https://github.com/opendatahub-io/kuberay.git | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| cache: false | |
| go-version: '1.24' | |
| - name: Install go dependencies | |
| run: | | |
| ls | |
| cd ${{ github.workspace }}/kuberay/ray-operator | |
| go mod download | |
| - name: Install helm | |
| run: | | |
| curl -Lo helm.tar.gz https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz | |
| tar -zxvf helm.tar.gz | |
| mv linux-amd64/helm /usr/local/bin/helm | |
| helm repo add kuberay https://ray-project.github.io/kuberay-helm/ | |
| helm repo update | |
| - name: Install kind | |
| run: go install sigs.k8s.io/kind@latest | |
| - name: Create Kind Cluster | |
| run: kind create cluster | |
| - name: Set kubectl context | |
| run: kubectl cluster-info --context kind-kind | |
| - name: Install Older KubeRay Operator (v1.3.2) | |
| run: | | |
| helm repo add kuberay https://ray-project.github.io/kuberay-helm/ | |
| helm install kuberay-operator kuberay/kuberay-operator --version 1.3.2 | |
| - name: Wait for Kuberay Operator to be available | |
| run: kubectl wait --timeout=90s --for=condition=Available=true deployment -n default kuberay-operator | |
| - name: Prepare and Run Upgrade Tests | |
| run: | | |
| cd kuberay/ray-operator | |
| echo "--- START:Running e2e Operator upgrade (v1.3.2 to v1.4.0 operator) tests" | |
| KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m KUBERAY_TEST_UPGRADE_IMAGE=v1.4.0 \ | |
| go test -timeout 30m -v ./test/e2eupgrade | |
| echo "--- END:e2e Operator upgrade (v1.3.2 to v1.4.0 operator) tests finished" | |
| - name: Debug Kubernetes Cluster on Failure | |
| if: failure() | |
| run: | | |
| echo "--- DEBUG OUTPUT ---" | |
| echo "Checking GitHub Runner resources..." | |
| lscpu | |
| free -h | |
| echo "Checking Kubernetes cluster state..." | |
| kubectl cluster-info | |
| kubectl get nodes | |
| echo "Describing all nodes..." | |
| kubectl describe nodes | |
| echo "Printing all Kubernetes events..." | |
| kubectl get events -A | |
| echo "Getting logs of Kind control plane container..." | |
| docker logs kind-control-plane | |
| echo "--- END OF DEBUG OUTPUT ---" | |
| - name: Display all pods on kind cluster | |
| if: failure() | |
| run: kubectl get pods -A | |
| - name: Cleanup | |
| if: always() | |
| run: kind delete clusters --all || true | |