Adding minio nodeselector support #269
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
# This workflow sets up Testkube Kubernetes Tests | |
name: Testkube Kubernetes Tests | |
on: | |
push: | |
branches: ["main" ] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
testkube: | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Create k3d Cluster | |
uses: nolar/setup-k3d-k3s@v1 | |
with: | |
k3d-args: --no-lb | |
- name: Configuring kube context and getting cluster info | |
run: | | |
export KUBECONFIG=${HOME}/.kube/config | |
kubectl cluster-info | |
kubectl get pods -n kube-system | |
kubectl get nodes | |
echo "kubeconfig-file-location:" $KUBECONFIG | |
echo "current-context:" $(kubectl config current-context) | |
export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) | |
echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars | |
echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars | |
- name: Install MinIO Helm Chart | |
id: minio_install | |
run: | | |
helm dep up charts/minio | |
helm install minio ./charts/minio/ | |
kubectl wait --for=condition=ready --timeout=30m pod -l app=minio | |
- name: Install Postgres Helm Chart | |
id: postgres_install | |
run: | | |
helm dep up charts/postgres | |
helm install postgres ./charts/postgres/ | |
kubectl wait --for=condition=ready --timeout=30m pod -l app=postgres | |
- name: Install SWOOP DB Initialization Helm Chart | |
id: swoop_db_init | |
run: | | |
helm install swoop-db-init ./charts/swoop-db-init/ | |
kubectl wait --for=condition=complete --timeout=30m job -l app=swoop-db-init | |
- name: Install SWOOP DB Migration Helm Chart | |
id: swoop_db_migration | |
run: | | |
helm install swoop-db-migration ./charts/swoop-db-migration/ | |
kubectl wait --for=condition=complete --timeout=30m job -l app=swoop-db-migration | |
- name: Install SWOOP API Helm Chart | |
id: swoop_install | |
run: | | |
helm install swoop-api ./charts/swoop-api/ | |
kubectl wait --for=condition=ready --timeout=30m pod -l app=swoop-api | |
- name: Load SWOOP DB Test Fixtures | |
id: swoop_db_load_fixture | |
run: | | |
kubectl exec -it --namespace=default svc/postgres -- /bin/sh -c "swoop-db load-fixture base_01" | |
- name: Checkout swoop repo | |
uses: actions/checkout@master | |
with: | |
repository: Element84/swoop | |
path: swoop | |
- name: Setup MinIO | |
run: | | |
kubectl port-forward svc/minio 9000:9000 & | |
curl https://dl.min.io/client/mc/release/linux-amd64/mc \ | |
--create-dirs \ | |
-o $HOME/minio-binaries/mc | |
chmod +x $HOME/minio-binaries/mc | |
export PATH=$PATH:$HOME/minio-binaries/ | |
export MINIO_ACCESS_KEY=`helm get values minio -a -o json | jq -r .service.accessKeyId | base64 --decode` | |
export MINIO_SECRET_KEY=`helm get values minio -a -o json | jq -r .service.secretAccessKey | base64 --decode` | |
mc alias set swoopminio http://127.0.0.1:9000 $MINIO_ACCESS_KEY $MINIO_SECRET_KEY | |
mc cp --recursive swoop/tests/fixtures/io/base_01/ swoopminio/swoop/executions/2595f2da-81a6-423c-84db-935e6791046e/ | |
- name: Installing Testkube | |
run: | | |
wget -qO - https://repo.testkube.io/key.pub | sudo apt-key add - | |
echo "deb https://repo.testkube.io/linux linux main" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y testkube | |
kubectl testkube install --no-confirm | |
kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube | |
kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & | |
testkube config api-uri http://127.0.0.1:8088/v1 | |
- name: Create Testkube Tests | |
continue-on-error: true | |
run: | | |
testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/helm/curl/swoop-api-root-test.json --variable apiHost=swoop-api.default:8000 | |
testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/helm/curl/swoop-api-jobs-test.json --variable apiHost=swoop-api.default:8000 | |
testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/helm/curl/swoop-api-payload-input-test.json --variable apiHost=swoop-api.default:8000 | |
testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/helm/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=swoop-api.default:8000 | |
- name: Running Testkube Tests | |
run: | | |
testkube run test --watch swoop-api-root-test | |
testkube run test --watch swoop-api-jobs-test | |
testkube run test --watch swoop-api-payload-input-test | |
testkube run test --watch swoop-api-simple-k6-load-test |