(ci): pre-configuration of e2e testing #56
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
name: E2E | |
on: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: Run the build with upterm debugging enabled | |
(https://github.com/lhotari/action-upterm/) | |
required: false | |
default: false | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: e2e-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
name: Unit Test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- name: Run Unit Tests | |
run: go test ./... | |
e2e-test-empty: | |
runs-on: ubuntu-latest | |
# container: | |
# image: quay.io/containers/podman:latest | |
# options: --privileged | |
name: E2E Empty Test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Kind | |
run: | | |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.12.0/kind-linux-amd64 | |
chmod +x ./kind | |
sudo mv ./kind /usr/local/bin/kind | |
- name: Create and Start Kind Cluster | |
run: kind create cluster | |
- name: Install kubectl | |
run: | | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
- name: Set up kubectl | |
run: | | |
kind export kubeconfig --name kind-kind | |
kubectl cluster-info | |
# - name: Set up Go | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: "1.22" | |
# - name: Install Orbstack | |
# run: go install github.com/your-username/orbstack | |
# - name: Run Orbstack Tests | |
# run: | | |
# orbstack --test | |
- name: Install DevSpace | |
run: | | |
curl -fsSL -o /tmp/devspace https://github.com/devspace-cloud/devspace/releases/latest/download/devspace-linux-amd64 | |
chmod +x /tmp/devspace | |
sudo mv /tmp/devspace /usr/local/bin/devspace | |
# - name: Configure kubectl | |
# uses: actions-hub/kubectl@master | |
# env: | |
# KUBE_CONFIG: YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6CiAgLSBjbHVzdGVyOgogICAgICBjZXJ0aWZpY2F0ZS1hdXRob3JpdHktZGF0YTogTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSmtha05EUVZJeVowRjNTVUpCWjBsQ1FVUkJTMEpuWjNGb2EycFBVRkZSUkVGcVFXcE5VMFYzU0hkWlJGWlJVVVJFUW1oeVRUTk5kR015Vm5rS1pHMVdlVXhYVG1oUlJFVXpUVVJuZDAxRVozbE5WRTEzU0doalRrMXFVWGROYWtVeFRWUlJNRTE2VFhwWGFHTk9UWHBSZDAxcVJYbE5WRkV3VFhwTmVncFhha0ZxVFZORmQwaDNXVVJXVVZGRVJFSm9jazB6VFhSak1sWjVaRzFXZVV4WFRtaFJSRVV6VFVSbmQwMUVaM2xOVkUxM1YxUkJWRUpuWTNGb2EycFBDbEJSU1VKQ1oyZHhhR3RxVDFCUlRVSkNkMDVEUVVGU09YbHFSbVJuUzFOR2NqWTRlRGxJYlVNM0x6SjNaa0V5VkVGb2VFWjFOR0paWTFkSFVFWTBSRVVLTjA5WFlUaHVlVlJNZW1KQmVGVkhSbFZDY0c0dlFYQTBiV1JvUzI1U1UxWXZaVlpTT1hGMFprMTNlVGR2TUVsM1VVUkJUMEpuVGxaSVVUaENRV1k0UlFwQ1FVMURRWEZSZDBSM1dVUldVakJVUVZGSUwwSkJWWGRCZDBWQ0wzcEJaRUpuVGxaSVVUUkZSbWRSVlc1R2FqUnhRa3RNVUdSbWQweHlWRXBLWjJweUNqZHJlRTg0TjNOM1EyZFpTVXR2V2tsNmFqQkZRWGRKUkZKM1FYZFNRVWxuUkd3dk9UaFFTSEUwTTNwUGVuTjVRMDVqV1VFemIwODVSRTByVjI1eFFtRUtaSEp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SEowUXdwMlFVRnJUMUk0ZDBObldVbExiMXBKZW1vd1JVRjNTVVJUVVVGM1VtZEphRUZQTTJGSE9VMUNSM0pWVFhaeFdHaFZWRzVTTkVGaVlTOTZOamRUU0ZOTkNtbHdjR1ZPVGxZclVsY3liVUZwUlVGM1NETnRiRGRzTW1ZeGRXczFVMGxITVVwdlNYZE1TMWxqYVdGaWJGTkZOR2xMVW1kS1JFaGxXRkYzUFFvdExTMHRMVVZPUkNCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2c9PQogICAgICBjbGllbnQta2V5LWRhdGE6IExTMHRMUzFDUlVkSlRpQkZReUJRVWtsV1FWUkZJRXRGV1MwdExTMHRDazFJWTBOQlVVVkZTVTlKTmtZck9EQlhhbWRSTkVoRmNGb3lWV3BvVFZsRVQweEJhekJIZGtnNFNreHVlVUpDTVhkcmR6UnZRVzlIUTBOeFIxTk5ORGtLUVhkRlNHOVZVVVJSWjBGRll6TTJaMmxUV0ZoNEt6aE1ha2xwVTJOeFUwMTBXVmh5V1ZKd01tOXBXREowVjFSa0szQndPWGxOYkdscE1HWkphMFZoVEFwR1NIa3ZSbGRsU3poSGFURk1haXRtVFZCMWJYRkZlbGh3VkVSa1IybDVZek5SUFQwS0xTMHRMUzFGVGtRZ1JVTWdVRkpKVmtGVVJTQkxSVmt0TFMwdExRbz0K | |
# with: | |
# args: get pods | |
# - name: Setup Kubernetes | |
# uses: azure/aks-set-context@v1 | |
# with: | |
# creds: ${{ secrets.KUBE_CONFIG }} | |
# kubeconfig: config | |
# context: your-context-name | |
# - name: Check Kubernetes config | |
# run: | | |
# cat config | |
# - name: Install kubectl, kustomize and clusterctl | |
# run: | | |
# # curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ | |
# curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash && sudo mv kustomize /usr/local/bin/ | |
# curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/clusterctl-linux-amd64 -o clusterctl && chmod +x clusterctl && sudo mv clusterctl /usr/local/bin/ | |
# - name: Run clusterctl command | |
# run: | | |
# clusterctl config repositories | grep vcluster | |
# - name: Set Kubernetes context | |
# run: | | |
# kubectl config set-context test-PR --kubeconfig=$HOME/.kube/config | |
# - name: Set Podman as current context for kubectl | |
# run: | | |
# export KUBECONFIG=/run/user/$(id -u)/podman/podman.sock | |
# - name: Run podman | |
# run: | | |
# sudo podman --storage-driver=overlay version | |
# - name: Run kubectl | |
# run: | | |
# kubectl version --client | |
- name: Verify Kubernetes context | |
run: | | |
kubectl config get-contexts | |
- name: Check Kubernetes config file | |
run: | | |
cat $HOME/.kube/config | |
# - name: Configure kubectl | |
# run: | | |
# kubectl config set-context test-PR | |
- name: Check Kubernetes connectivity | |
run: | | |
echo "=== Kube config ===" | |
cat $HOME/.kube/config | |
echo "=== Kubectl version ===" | |
kubectl version --client | |
echo "=== Kubectl config ===" | |
kubectl config view | |
echo "=== Kubectl current context ===" | |
kubectl config current-context | |
echo "=== Kubectl cluster info ===" | |
kubectl cluster-info | |
echo "=== Kubectl get nodes ===" | |
kubectl get nodes | |
echo "=== Kubectl get pods ===" | |
kubectl get pods --all-namespaces | |
echo "=== Kubectl get namespaces ===" | |
kubectl get namespaces | |
echo "=== Test kubectl command ===" | |
kubectl get all --all-namespaces | |
- name: Run kubectl get namespaces | |
run: | | |
kubectl get namespaces | |
- name: DevSpace Deploy | |
run: | | |
devspace deploy -p deploy | |