Skip to content

Commit dfffd9b

Browse files
Remove test-e2e-sdk github job by refactoring it as a matrix strategy
1 parent 17f967e commit dfffd9b

File tree

1 file changed

+19
-79
lines changed

1 file changed

+19
-79
lines changed

.github/workflows/turing.yaml

Lines changed: 19 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,16 @@ jobs:
339339
strategy:
340340
fail-fast: false
341341
matrix:
342-
name: ["In-cluster credentials", "Remote cluster credentials"]
342+
name: ["In-cluster credentials; API e2e", "Remote cluster credentials; SDK e2e"]
343343
include:
344-
- name: "In-cluster credentials"
344+
- name: "In-cluster credentials; API e2e"
345345
useInClusterConfig: true
346346
valuesFile: "turing.values.in-cluster.yaml"
347-
- name: "Remote cluster credentials"
347+
useSDK: false
348+
- name: "Remote cluster credentials; SDK e2e"
348349
useInClusterConfig: false
349350
valuesFile: "turing.values.remote.yaml"
351+
useSDK: true
350352

351353
steps:
352354
- name: Check out code
@@ -369,7 +371,19 @@ jobs:
369371
local_registry: ${{ env.LOCAL_REGISTRY }}
370372
cluster_init_version: ${{ env.CLUSTER_INIT_VERSION }}
371373

374+
- name: Setup Python
375+
if: ${{ matrix.useSDK }}
376+
uses: actions/setup-python@v2
377+
with:
378+
python-version: 3.9
379+
380+
- name: Install Python dependencies
381+
if: ${{ matrix.useSDK }}
382+
working-directory: sdk
383+
run: make setup
384+
372385
- name: Run End-to-End Test Suite
386+
if: ${{ !matrix.useSDK }}
373387
id: run-e2e-test
374388
working-directory: api
375389
env:
@@ -383,81 +397,8 @@ jobs:
383397
KUBECONFIG_USE_LOCAL: true
384398
run: go test -v -parallel=2 ./e2e/... -tags=e2e -run TestEndToEnd
385399

386-
- if: (steps.wait-for-deployment.outcome == 'failure' || steps.run-e2e-test.outcome == 'failure') && always()
387-
name: "Debug Deployment Failure"
388-
run: |
389-
echo "::group::describe deployment/turing-mlp"
390-
kubectl describe deployment/turing-mlp
391-
echo "::endgroup::"
392-
393-
echo "::group::describe deployment/turing-merlin"
394-
kubectl describe deployment/turing-merlin
395-
echo "::endgroup::"
396-
397-
echo "::group::describe deployment/turing"
398-
kubectl describe deployment/turing
399-
echo "::endgroup::"
400-
401-
echo "::group::secret/turing-api-config"
402-
kubectl get secret/turing-api-config -o jsonpath='{.data.config\.yaml}' | base64 --decode
403-
echo "::endgroup::"
404-
405-
echo "::group::logs deployment/turing-mlp"
406-
kubectl logs deployment/turing-mlp
407-
echo "::endgroup::"
408-
409-
echo "::group::logs deployment/turing-merlin"
410-
kubectl logs deployment/turing-merlin
411-
echo "::endgroup::"
412-
413-
echo "::group::logs deployment/turing"
414-
kubectl logs deployment/turing
415-
echo "::endgroup::"
416-
417-
test-e2e-sdk:
418-
runs-on: ubuntu-latest
419-
env:
420-
CLUSTER_INIT_VERSION: ${{ needs.build-cluster-init.outputs.cluster-init-version }}
421-
TURING_API_VERSION: ${{ needs.build-api.outputs.api-version }}
422-
TURING_ROUTER_VERSION: ${{ needs.build-router.outputs.router-version }}
423-
TEST_EXPERIMENT_ENGINE_PLUGIN_VERSION: ${{ needs.build-test-experiment-engine-plugin.outputs.test-experiment-engine-plugin-version }}
424-
needs:
425-
- build-api
426-
- build-router
427-
- build-test-experiment-engine-plugin
428-
- build-cluster-init
429-
430-
steps:
431-
- name: Check out code
432-
uses: actions/checkout@v2
433-
434-
- name: Set Up Test Cluster
435-
uses: ./.github/actions/setup-test-cluster
436-
with:
437-
go-version: ${{ env.GO_VERSION }}
438-
turing_api_tar_archive_name: turing-api.${{ env.TURING_API_VERSION }}.tar
439-
turing_router_tar_archive_name: turing-router.${{ env.TURING_ROUTER_VERSION }}.tar
440-
experiment_engine_plugin_archive_name: test-experiment-engine-plugin.${{ env.TEST_EXPERIMENT_ENGINE_PLUGIN_VERSION }}.tar
441-
cluster_init_tar_archive_name: cluster-init.${{ env.CLUSTER_INIT_VERSION }}.tar
442-
use_in_cluster_config: false
443-
values_file: "turing.values.remote.yaml"
444-
cluster_name: ${{ env.CLUSTER_NAME }}
445-
istio_version: ${{ env.ISTIO_VERSION }}
446-
knative_version: ${{ env.KNATIVE_VERSION }}
447-
knative_istio_version: ${{ env.KNATIVE_ISTIO_VERSION }}
448-
local_registry: ${{ env.LOCAL_REGISTRY }}
449-
cluster_init_version: ${{ env.CLUSTER_INIT_VERSION }}
450-
451-
- name: Setup Python
452-
uses: actions/setup-python@v2
453-
with:
454-
python-version: 3.9
455-
456-
- name: Install dependencies
457-
working-directory: sdk
458-
run: make setup
459-
460400
- name: Run End-to-End Test Suite with Turing SDK
401+
if: ${{ matrix.useSDK }}
461402
id: run-e2e-test-sdk
462403
working-directory: sdk
463404
env:
@@ -473,7 +414,7 @@ jobs:
473414
KSERVICE_DOMAIN: 127.0.0.1.nip.io
474415
run: make e2e-sdk
475416

476-
- if: (steps.wait-for-deployment.outcome == 'failure' || steps.run-e2e-test-sdk.outcome == 'failure') && always()
417+
- if: (steps.wait-for-deployment.outcome == 'failure' || steps.run-e2e-test.outcome == 'failure') && always()
477418
name: "Debug Deployment Failure"
478419
run: |
479420
echo "::group::describe deployment/turing-mlp"
@@ -531,7 +472,6 @@ jobs:
531472
- build-ui
532473
- release-rules
533474
- test-e2e
534-
- test-e2e-sdk
535475
- test-api
536476
- test-engines-router
537477
- test-engines-experiment

0 commit comments

Comments
 (0)