From 600e22d12a07c80c29458997694685ba492b63fd Mon Sep 17 00:00:00 2001 From: merlos <404446+merlos@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:03:03 +0300 Subject: [PATCH] add validations and install in macos --- .github/workflows/install-tests.yml | 82 +++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install-tests.yml b/.github/workflows/install-tests.yml index f1a1ee2..cb3cea1 100644 --- a/.github/workflows/install-tests.yml +++ b/.github/workflows/install-tests.yml @@ -56,12 +56,17 @@ jobs: helm version helm list - + + # Check new paths + whereis helm + whereis kubectl + # Tests if the script checks ok - - name: Test install-magasin.sh - + - name: Test install-magasin.sh run: | # We need to run the local helm repo in background ./dev-scripts/local-helm-repo.sh & + # Now we install cd scripts/installer @@ -70,12 +75,18 @@ jobs: echo " count: 1" >> drill.yaml # We use the local repo and we test that the prefix and postfix work - ./install-magasin.sh -u http://localhost:8000 -r mgs-test # For local inspection kubeclt get pods --all-namespaces - + + + # Validate all charts have been installed + helm list -n mgs-drill-test + helm list -n mgs-dagster-test + helm list -n mgs-daskhub-test + helm list -n mgs-superset-test + # # UNINSTALLER tests GNU/Linux # @@ -85,11 +96,20 @@ jobs: run: | cd scripts/installer ./uninstall-magasin.sh -c + + # Test if the script tests + - name: Test uninstall-magasin.sh -r mgs-test + run: | + cd scripts/installer + ./uninstall-magasin.sh -r mgs-test + + # namespaces should not exist anymore + kubectl get namespaces # # INSTALLER | MacOS # - installer-on-macos: + tests-on-macos: runs-on: macos-latest # Specifies the macOS runner strategy: # Keep running even if one variation of the job fail @@ -103,6 +123,58 @@ jobs: cd scripts/installer zsh ./install-magasin.sh -c + # Install a k3s cluster + # This action also installs helm.. + - name: Start a local k8s cluster + uses: jupyterhub/action-k3s-helm@v3 + with: + k3s-channel: latest + metrics-enabled: false + traefik-enabled: false + docker-enabled: false + + - name: Verify function of k8s, kubectl, and helm + run: | + echo "kubeconfig: $KUBECONFIG" + kubectl version + kubectl get pods --all-namespaces + + helm version + helm list + + # Check new paths + whereis helm + whereis kubectl + + # Tests if the script checks ok + - name: Test install-magasin.sh + run: | + # We need to run the local helm repo in background + ./dev-scripts/local-helm-repo.sh & + + # Now we install + cd scripts/installer + + # We will test that yaml files overwrite + echo "drill: " > drill.yaml + echo " count: 1" >> drill.yaml + + # We use the local repo and we test that the prefix and postfix work + ./install-magasin.sh -u http://localhost:8000 -r mgs-test + + # For local inspection + kubeclt get pods --all-namespaces + + + # Validate all charts have been installed + helm list -n mgs-drill-test + helm list -n mgs-dagster-test + helm list -n mgs-daskhub-test + helm list -n mgs-superset-test + + + + # Test uninstall - name: Test uninstall-magasin.sh -c run: | cd scripts/installer