From 1bd328125db34d66acfe6549f2192ceaf4207a7a Mon Sep 17 00:00:00 2001 From: Camila Macedo Date: Wed, 13 Nov 2024 09:09:04 +0000 Subject: [PATCH] (ci): Add GitHub Action to validate installation on Linux and Mac envs We are currently facing issues where the installation process is breaking, and we are unable to detect these failures in CI. This action introduces a validation step to ensure that we can at least install the solution, validating the installation script provided in the Getting Started guide. This is a minimal basic test expected to enhance the developer experience (DX) by reducing user frustration with installation issues. --- .github/workflows/install.yaml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/install.yaml diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml new file mode 100644 index 000000000..6eba5084f --- /dev/null +++ b/.github/workflows/install.yaml @@ -0,0 +1,51 @@ +name: Install + +on: + workflow_dispatch: + pull_request: + merge_group: + push: + branches: + - main + +jobs: + kind-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Install the latest version of kind + run: | + curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind + + - name: Create Kind cluster for operator-controller + run: | + kind create cluster --name operator-controller + + - name: Build the project + run: | + make docker-build + + - name: Load image into Kind cluster and deploy + run: | + make kind-load kind-deploy + + - name: Logs and Details + if: always() + run: | + # Capture high-level information + echo "Gathering details for all resources in namespace olmv1-system..." + kubectl get all -n olmv1-system + + # Describe each pod in the namespace for more details + for pod in $(kubectl get pods -n olmv1-system -o jsonpath='{.items[*].metadata.name}'); do + echo "Describing pod $pod..." + kubectl describe pod $pod -n olmv1-system + echo "Logs for pod $pod:" + kubectl logs $pod -n olmv1-system --all-containers=true + done