@@ -57,28 +57,70 @@ jobs:
5757 NODE_OPTIONS : --max_old_space_size=16384
5858 run : xvfb-run npm run test:coverage --silent
5959
60+ # Install and start KinD cluster
6061 - name : Start KinD cluster
6162 if : (success() || failure()) && runner.os == 'Linux'
6263 uses : helm/kind-action@v1.14.0
6364 with :
6465 version : v0.31.0
6566 node_image : kindest/node:v1.34.0
6667
68+ # Configure cluster
6769 - name : Configure cluster
6870 if : (success() || failure()) && runner.os == 'Linux'
6971 run : |
70- curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1/install.sh | bash -s v0.19.1
71- kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
72- kubectl create -f https://operatorhub.io/install/cloudnative-pg.yaml
73- nb=0
74- echo -n "Waiting for operator to show up "
75- while [ "$nb" != "2" ]
76- do
77- echo -n "."
72+ set -euo pipefail
73+
74+ echo "Installing CloudNativePG..."
75+ kubectl create -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.1.yaml
76+
77+ echo "Installing OLM (for SBO)..."
78+ kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/crds.yaml
79+ kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/olm.yaml
80+
81+ kubectl wait --for=condition=Available deployment -n olm --all --timeout=180s
82+
83+ echo "Installing Service Binding Operator via OLM..."
84+ kubectl apply -f https://operatorhub.io/install/service-binding-operator.yaml
85+
86+ echo "Waiting for operators..."
87+
88+ # CNPG
89+ kubectl wait --for=condition=Available deployment -n cnpg-system --all --timeout=180s
90+
91+ # OLM async flow
92+ echo "Waiting for Service Binding Operator CSV to appear..."
93+
94+ timeout=300
95+ elapsed=0
96+
97+ while true; do
98+ if kubectl get csv -n operators 2>/dev/null | grep -q service-binding-operator; then
99+ echo ""
100+ break
101+ fi
102+
103+ printf "."
78104 sleep 1
79- nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
105+ elapsed=$((elapsed+1))
106+
107+ if [ "$elapsed" -ge "$timeout" ]; then
108+ echo ""
109+ echo "❌ Timeout waiting for CSV"
110+ exit 1
111+ fi
80112 done
81- echo CLUSTER_URL=`kubectl cluster-info | sed -n -e "s/\x1B\[[0-9;]*[a-zA-Z]//g" -e '1s/.*running at \(.*\)$/\1/p'` >> $GITHUB_ENV
113+
114+ echo "Waiting for Service Binding Operator CSV to succeed..."
115+ kubectl wait --for=jsonpath='{.status.phase}'=Succeeded \
116+ csv -n operators --all --timeout=300s
117+
118+ # Now safe
119+ kubectl wait --for=condition=Available deployment -n operators --all --timeout=180s
120+
121+ echo "Extracting cluster URL..."
122+ echo "CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')" >> $GITHUB_ENV
123+
82124 # UI tests fail under linux
83125 # Run UI tests
84126 - name : Run UI Tests
0 commit comments