From c3043bb7adc21e7248eaedf57f6a00c54ef65f14 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 24 Apr 2023 11:21:29 -0700 Subject: [PATCH] tests Signed-off-by: Kevin Su --- .github/workflows/checks.yml | 8 +++++++- Makefile | 4 ++++ boilerplate/flyte/end2end/Makefile | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 511985f64..53381d2f7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -130,19 +130,23 @@ jobs: run: mkdir -p /tmp/tmp/${{ matrix.package }}/docker-images && docker save flyteorg/${{ matrix.package }}:builder -o /tmp/tmp/${{ matrix.package }}/docker-images/snapshot-builder.tar && docker save flyteorg/${{ matrix.package }}:latest -o /tmp/tmp/${{ matrix.package }}/docker-images/snapshot.tar - name: Create Sandbox Cluster + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} run: | cp /tmp/tmp/${{ matrix.package }}/docker-images/snapshot.tar snapshot.tar flytectl config init flytectl sandbox start --source=$(pwd) - name: Prime docker cache + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} run: | flytectl sandbox exec -- docker load -i /root/snapshot.tar - name: Setup Flytekit + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} run: | python -m pip install --upgrade pip pip install flytekit pip freeze - name: Register flytesnacks examples + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} uses: unionai/flyte-register-action@v0.0.2 with: flytesnacks: true @@ -150,18 +154,20 @@ jobs: version: "latest" domain: development - name: Pre Upgrade Tests - if: ${{ github.event.repository.name == 'flyteadmin' }} + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} env: PRIORITIES: ${{ env.PRIORITIES }} run: | make end2end_execute - name: Upgrade Helm charts + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} run: | flytectl sandbox exec -- helm repo add flyteorg https://flyteorg.github.io/flyte flytectl sandbox exec -- helm repo update flytectl sandbox exec -- helm upgrade flyte -n flyte-core --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte-core -f /flyteorg/share/flyte/values-sandbox.yaml --wait --set ${{ matrix.package }}.image.repository=flyteorg/${{ matrix.package }},${{ matrix.package }}.image.tag=latest flytectl sandbox exec -- k3s kubectl get pods -n flyte -o yaml - name: Post Upgrade Tests + if : ${{ matrix.package == 'flyteadmin' || matrix.package == 'flytepropeller' || matrix.package == 'flytecopilot' || matrix.package == 'datacatalog' }} env: PRIORITIES: ${{ env.PRIORITIES }} run: | diff --git a/Makefile b/Makefile index 94e4b232d..73f6079d6 100644 --- a/Makefile +++ b/Makefile @@ -107,3 +107,7 @@ build_native_flyte: update_boilerplate: @curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh @boilerplate/update.sh + +.PHONY: end2end_execute +end2end_execute: + @boilerplate/flyte/end2end/end2end.sh boilerplate/flyte/end2end/functional-test-config.yaml --return_non_zero_on_failure \ No newline at end of file diff --git a/boilerplate/flyte/end2end/Makefile b/boilerplate/flyte/end2end/Makefile index 4e44a72c7..837ca8409 100644 --- a/boilerplate/flyte/end2end/Makefile +++ b/boilerplate/flyte/end2end/Makefile @@ -3,11 +3,10 @@ # # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst -current_dir := $(CURDIR) .PHONY: end2end_execute end2end_execute: - $(current_dir)/end2end.sh $(current_dir)/functional-test-config.yaml --return_non_zero_on_failure + ../boilerplate/flyte/end2end/end2end.sh ../boilerplate/flyte/end2end/functional-test-config.yaml --return_non_zero_on_failure .PHONY: k8s_integration_execute k8s_integration_execute: