Test installer #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
name: Test installer | |
jobs: | |
# | |
# GNU/Linux | |
# | |
tests-on-gnu-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
# Keep running even if one variation of the job fail | |
fail-fast: false | |
# | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
# Tests if the script checks ok | |
- name: Test install-magasin.sh -c (dependencies installed) | |
run: | | |
cd scripts/installer | |
./install-magasin.sh -c | |
- name: Remove kubeclt and helm | |
run: | | |
whereis kubectl | |
whereis helm | |
dpkg -s kubectl | |
sudo apt-get remove -y kubectl | |
sudo rm /usr/local/bin/helm | |
# Tests if the script checks ok | |
- name: Test install-magasin.sh -c (dependencies missing) | |
run: | | |
cd scripts/installer | |
./install-magasin.sh -c | |
# 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 run a local helm repo in background | |
pwd | |
cd dev-scripts | |
./local-helm-repo.sh & | |
sleep 15 | |
cd .. | |
# Now we install magasin | |
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 | |
# | |
# UNINSTALLER tests GNU/Linux | |
# | |
# Test if the script tests | |
- name: Test uninstall-magasin.sh -c | |
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 | |
# | |
tests-on-macos: | |
runs-on: macos-latest # Specifies the macOS runner | |
strategy: | |
# Keep running even if one variation of the job fail | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # Action to checkout your repository's code | |
- name: Test install-magasin.sh -c | |
run: | | |
cd scripts/installer | |
zsh ./install-magasin.sh -c | |
- name: Install kind k8s cluster | |
run: | | |
brew install cask docker | |
docker --version | |
brew install kind | |
kind create cluster | |
kubectl cluster-info --context kind-kind | |
# Tests if the script checks ok | |
- name: Test install-magasin.sh | |
run: | | |
# We need to run the local helm repo in background | |
# this has the current branch repo | |
pwd | |
cd dev-scripts | |
./local-helm-repo.sh & | |
# Give time to the repo to be built | |
# TODO improve this | |
sleep 15 | |
# Go to installe forlder | |
cd scripts/installer | |
# Test that yaml files overwrite the values | |
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 | |
zsh ./uninstall-magasin.sh -c |