55 paths :
66 - ' applications/mlflow/charts/**'
77 - ' applications/mlflow/kots/**'
8+ - ' applications/mlflow/tests/**'
89 - ' .github/workflows/mlflow-ci.yml'
910 push :
1011 branches :
1112 - main
1213 paths :
1314 - ' applications/mlflow/charts/**'
1415 - ' applications/mlflow/kots/**'
16+ - ' applications/mlflow/tests/**'
1517 - ' .github/workflows/mlflow-ci.yml'
1618
1719env :
@@ -148,6 +150,10 @@ jobs:
148150 # version: 1.31
149151 # - distribution: kind
150152 # version: 1.30
153+ config :
154+ - name : nodeport-ingress-disabled
155+ values_file : tests/helm/nodeport-ingress-disabled.yaml
156+ port : 30080
151157 steps :
152158 - name : Checkout
153159 uses : actions/checkout@v4
@@ -205,10 +211,21 @@ jobs:
205211 api-token : ${{ secrets.REPLICATED_PLATFORM_EXAMPLES_TOKEN }}
206212 kubernetes-distribution : ${{ matrix.cluster.distribution }}
207213 kubernetes-version : ${{ matrix.cluster.version }}
208- cluster-name : mlflow-ci-${{ github.run_id }}-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}
214+ cluster-name : mlflow-ci-${{ github.run_id }}-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}-${{ matrix.config.name }}
209215 ttl : 1h
210216 export-kubeconfig : true
211217
218+ - name : Expose Application Port
219+ id : expose-port
220+ uses : replicatedhq/replicated-actions/expose-port@main
221+ with :
222+ api-token : ${{ secrets.REPLICATED_PLATFORM_EXAMPLES_TOKEN }}
223+ cluster-id : ${{ steps.create-cluster.outputs.cluster-id }}
224+ port : ' ${{ matrix.config.port }}'
225+ protocols : ' http,https'
226+ wildcard : ' false'
227+ timeout-minutes : ' 5'
228+
212229 - name : Add Helm repositories
213230 run : |
214231 cd applications/mlflow
@@ -231,22 +248,44 @@ jobs:
231248 env :
232249 REPLICATED_LICENSE_ID : ${{ steps.get-license.outputs.license_id }}
233250
234- - name : Run Helm installation test with charts from Replicated registry
251+ - name : Run Helm installation test with chart-testing
235252 run : |
236253 cd applications/mlflow
237254 # Save kubeconfig to a file
238255 KUBECONFIG_FILE="/tmp/kubeconfig-${{ github.run_id }}"
239256 echo "$KUBECONFIG" > "$KUBECONFIG_FILE"
240257 echo "Saved kubeconfig to $KUBECONFIG_FILE"
241258
242- # Pass env vars directly to make
243- KUBECONFIG="$KUBECONFIG_FILE" REPLICATED_APP="$REPLICATED_APP" REPLICATED_CHANNEL="$REPLICATED_CHANNEL" REPLICATED_LICENSE_ID="$REPLICATED_LICENSE_ID" make test-replicated-helm
259+ # Set up environment for the make target
260+ export KUBECONFIG="$KUBECONFIG_FILE"
261+ export REPLICATED_APP="${REPLICATED_APP}"
262+ export REPLICATED_CHANNEL="${REPLICATED_CHANNEL}"
263+ export REPLICATED_LICENSE_ID="${REPLICATED_LICENSE_ID}"
264+
265+ # Use test-specific values file
266+ export MLFLOW_VALUES="${{ matrix.config.values_file }}"
267+
268+ echo "Running test '${{ matrix.config.name }}' with MLflow values file: $MLFLOW_VALUES"
269+
270+ # Run chart testing installation using our updated make target that uses 'ct'
271+ make test-replicated-helm-with-values
244272 env :
245273 KUBECONFIG : ${{ steps.create-cluster.outputs.cluster-kubeconfig }}
246274 REPLICATED_APP : ${{ env.APP_SLUG }}
247275 REPLICATED_CHANNEL : ${{ needs.create-release.outputs.channel-slug }}
248276 REPLICATED_LICENSE_ID : ${{ steps.get-license.outputs.license_id }}
249277
278+ # Application testing with our consolidated test file
279+ - name : Run Application Tests
280+ run : |
281+ cd applications/mlflow
282+ echo "Installing Python dependencies for tests..."
283+ pip install mlflow pandas scikit-learn
284+
285+ echo "Running MLflow application tests against ${{ steps.expose-port.outputs.hostname }}"
286+ python tests/mlflow_test.py 443 --protocol https
287+ if : false # Disabled for now until we're ready to implement application tests
288+
250289 - name : Install troubleshoot
251290 run : curl -L https://github.com/replicatedhq/troubleshoot/releases/latest/download/support-bundle_linux_amd64.tar.gz | tar xzvf -
252291 if : failure()
@@ -258,7 +297,7 @@ jobs:
258297 echo "$KUBECONFIG" > "$KUBECONFIG_FILE"
259298 echo "Saved kubeconfig to $KUBECONFIG_FILE"
260299
261- ./support-bundle --kubeconfig="$KUBECONFIG_FILE" --interactive=false -o ci-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }} https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml
300+ ./support-bundle --kubeconfig="$KUBECONFIG_FILE" --interactive=false -o ci-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}-${{ matrix.config.name }} https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml
262301 if : failure()
263302 env :
264303 KUBECONFIG : ${{ steps.create-cluster.outputs.cluster-kubeconfig }}
@@ -267,8 +306,8 @@ jobs:
267306 uses : actions/upload-artifact@v4
268307 if : failure()
269308 with :
270- name : mlflow-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}
271- path : ' ci-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}.tar.gz'
309+ name : mlflow-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}-${{ matrix.config.name }}
310+ path : ' ci-bundle-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}-${{ matrix.config.name }} .tar.gz'
272311
273312 - name : Remove Cluster
274313 uses :
replicatedhq/replicated-actions/[email protected]
0 commit comments