20
20
push :
21
21
pull_request :
22
22
23
+ env :
24
+ RAY_HELM_VERSION : 1.1.0
25
+ PYTHON_VERSION : 3.9
26
+ IMAGE_REPOSITORY : ghcr.io/apache/datafusion-ray
27
+
23
28
jobs :
24
29
build :
25
30
runs-on : ubuntu-latest
@@ -32,14 +37,15 @@ jobs:
32
37
uses : docker/metadata-action@v5
33
38
with :
34
39
images : |
35
- ghcr.io/apache/datafusion-ray
40
+ ${{ env.IMAGE_REPOSITORY }}
36
41
tags : |
37
42
type=ref,event=branch
38
43
type=ref,event=pr
39
44
type=semver,pattern={{version}}
40
45
type=semver,pattern={{major}}.{{minor}}
41
46
type=semver,pattern={{major}}
42
47
type=sha
48
+
43
49
- name : Set up Docker Buildx
44
50
uses : docker/setup-buildx-action@v3
45
51
59
65
tags : ${{ steps.meta.outputs.tags }}
60
66
labels : ${{ steps.meta.outputs.labels }}
61
67
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
+ uses : jlumbroso/free-disk-space@main
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