2020 push :
2121 pull_request :
2222
23+ env :
24+ RAY_HELM_VERSION : 1.1.0
25+ PYTHON_VERSION : 3.9
26+ IMAGE_REPOSITORY : ghcr.io/apache/datafusion-ray
27+
2328jobs :
2429 build :
2530 runs-on : ubuntu-latest
@@ -32,14 +37,15 @@ jobs:
3237 uses : docker/metadata-action@v5
3338 with :
3439 images : |
35- ghcr.io/apache/datafusion-ray
40+ ${{ env.IMAGE_REPOSITORY }}
3641 tags : |
3742 type=ref,event=branch
3843 type=ref,event=pr
3944 type=semver,pattern={{version}}
4045 type=semver,pattern={{major}}.{{minor}}
4146 type=semver,pattern={{major}}
4247 type=sha
48+
4349 - name : Set up Docker Buildx
4450 uses : docker/setup-buildx-action@v3
4551
5965 tags : ${{ steps.meta.outputs.tags }}
6066 labels : ${{ steps.meta.outputs.labels }}
6167 push : ${{ startsWith(github.ref, 'refs/tags/') }}
68+ load : true
69+
70+ - name : Kind Cluster
71+ 72+ with :
73+ config : ./k8s/kind-config.yaml
74+
75+ - name : Free Disk Space (Ubuntu)
76+ 77+ with :
78+ # this might remove tools that are actually needed,
79+ # when set to "true" but frees about 6 GB
80+ tool-cache : true
81+ docker-images : false
82+
83+ - name : Extract short SHA
84+ run : |
85+ SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
86+ echo "IMAGE_TAG=sha-${SHORT_SHA}" >> "$GITHUB_ENV"
87+ echo "Extracted short SHA tag: sha-${SHORT_SHA}"
88+
89+ - name : Load Docker image into Kind cluster
90+ run : |
91+ kind load docker-image ${{ env.IMAGE_REPOSITORY }}:${{ env.IMAGE_TAG }} -n chart-testing
92+
93+ - name : Install Helm
94+ 95+ with :
96+ version : " 3.16.0"
97+
98+ - name : Deploy helm chart
99+ run : |
100+ helm repo add kuberay https://ray-project.github.io/kuberay-helm/
101+ helm install kuberay-operator kuberay/kuberay-operator --version ${{ env.RAY_HELM_VERSION }}
102+ helm install raycluster kuberay/ray-cluster --version ${{ env.RAY_HELM_VERSION }} \
103+ --set image.repository=${{ env.IMAGE_REPOSITORY }} \
104+ --set image.tag=${{ env.IMAGE_TAG }} \
105+ --set imagePullPolicy=Always
106+ echo "Deployed Ray cluster with image repository: ${{ env.IMAGE_REPOSITORY }} and tag: ${{ env.IMAGE_TAG }}"
107+
108+ - name : Set up Python
109+ uses : actions/setup-python@v3
110+ with :
111+ python-version : ${{ env.PYTHON_VERSION }}
112+
113+ - name : Install python dependencies
114+ run : |
115+ python -m pip install --upgrade pip
116+ pip install -r requirements-in.txt
117+
118+ - name : Submit an example ray Job
119+ run : |
120+ kubectl port-forward service/raycluster-kuberay-head-svc 8265:8265 &
121+ export RAY_ADDRESS="http://127.0.0.1:8265"
122+ pip install "ray[default]"
123+ ray job submit --working-dir ./examples/ -- python3 tips.py
0 commit comments