(ci): pre-configuration of e2e testing #38
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 | |
name: E2E Empty Test | |
steps: | |
- name: Echo hello | |
run: | | |
echo "hello" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- 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: 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: Run kubectl commands | |
run: | | |
kubectl cluster-info | |
# Verify cluster nodes | |
kubectl get nodes | |
# Check all pods in all namespaces | |
kubectl get pods --all-namespaces | |
- name: Run kubectl get namespaces | |
run: | | |
kubectl get namespaces | |
- name: DevSpace Deploy | |
run: | | |
devspace deploy -p deploy | |