Skip to content

Commit 5076adb

Browse files
(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.
1 parent 6d79092 commit 5076adb

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/install.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Install
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
merge_group:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
kind-deploy:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-go@v5
21+
with:
22+
go-version-file: go.mod
23+
24+
- name: Set up Docker on macOS
25+
if: matrix.os == 'macos-latest'
26+
run: |
27+
brew install docker colima
28+
29+
- name: Install the latest version of kind
30+
run: |
31+
# Determine OS and architecture
32+
OS=$(uname | tr '[:upper:]' '[:lower:]')
33+
ARCH=$(uname -m)
34+
if [[ "$ARCH" == "x86_64" ]]; then
35+
ARCH="amd64"
36+
elif [[ "$ARCH" == "arm64" ]]; then
37+
ARCH="arm64"
38+
fi
39+
40+
# Download and install kind
41+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-${OS}-${ARCH}
42+
chmod +x ./kind
43+
sudo mv ./kind /usr/local/bin/kind
44+
45+
- name: Create Kind cluster for operator-controller
46+
run: |
47+
kind create cluster --name operator-controller
48+
49+
- name: Build the project
50+
run: |
51+
make build docker-build
52+
53+
- name: Load image into Kind cluster and deploy
54+
run: |
55+
make kind-load kind-deploy
56+
57+
- name: Logs and Details
58+
if: always()
59+
run: |
60+
# Capture high-level information
61+
echo "Gathering details for all resources in namespace olmv1-system..."
62+
kubectl get all -n olmv1-system
63+
64+
# Describe each pod in the namespace for more details
65+
for pod in $(kubectl get pods -n olmv1-system -o jsonpath='{.items[*].metadata.name}'); do
66+
echo "Describing pod $pod..."
67+
kubectl describe pod $pod -n olmv1-system
68+
echo "Logs for pod $pod:"
69+
kubectl logs $pod -n olmv1-system --all-containers=true
70+
done

0 commit comments

Comments
 (0)