branch-dispatch #20
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: Checkout repository | |
| uses: actions/checkout@v4 | |
| - 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 | |
| - name: Install kind | |
| run: go install sigs.k8s.io/kind@latest | |
| - name: Setup first Kind Cluster with KubeRay Helm Repo | |
| uses: ./.github/actions/setup-kind-cluster | |
| - name: Install Older KubeRay Operator (v1.3.2) | |
| uses: ./.github/actions/install-kuberay-operator | |
| with: | |
| version: '1.3.2' | |
| - name: Prepare and Run Upgrade Tests to 1.4.0 | |
| id: upgrade-to-latest | |
| 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 First Test Failure | |
| if: failure() && steps.upgrade-to-latest.outcome == 'failure' | |
| uses: ./.github/actions/debug-kubernetes-cluster | |
| - name: Cleanup first Kind Cluster | |
| if: always() | |
| uses: ./.github/actions/cleanup-kind-cluster | |
| - name: Setup second Kind Cluster with KubeRay Helm Repo | |
| uses: ./.github/actions/setup-kind-cluster | |
| - name: Install KubeRay Operator (v1.4.0) for nightly upgrade | |
| uses: ./.github/actions/install-kuberay-operator | |
| with: | |
| version: '1.4.0' | |
| - name: Prepare and Run Upgrade Tests to nightly | |
| id: upgrade-to-nightly | |
| run: | | |
| cd kuberay/ray-operator | |
| export KUBERAY_TEST_UPGRADE_IMAGE="nightly" | |
| export IMG="kuberay/kuberay-operator:$KUBERAY_TEST_UPGRADE_IMAGE" | |
| make docker-image | |
| kind load docker-image "$IMG" | |
| echo "--- START:Running e2e Operator upgrade (v1.4.0 to nightly operator) tests" | |
| USE_LOCAL_HELM_CHART=true KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m KUBERAY_TEST_UPGRADE_IMAGE="$KUBERAY_TEST_UPGRADE_IMAGE" \ | |
| go test -timeout 30m -v ./test/e2eupgrade | |
| echo "--- END:e2e Operator upgrade (v1.4.0 to nightly operator) tests finished" | |
| - name: Debug Kubernetes Cluster on Second Test Failure | |
| if: failure() && steps.upgrade-to-nightly.outcome == 'failure' | |
| uses: ./.github/actions/debug-kubernetes-cluster | |
| - name: Cleanup second Kind Cluster | |
| if: always() | |
| uses: ./.github/actions/cleanup-kind-cluster | |