Skip to content

Commit 0ce4a9e

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 0ce4a9e

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/install.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 --cask docker
28+
open /Applications/Docker.app
29+
# Wait for Docker to start
30+
while (! docker stats --no-stream ); do
31+
echo "Waiting for Docker to launch..."
32+
sleep 1
33+
done
34+
35+
- name: Install the latest version of kind
36+
run: |
37+
# Determine OS and architecture
38+
OS=$(uname | tr '[:upper:]' '[:lower:]')
39+
ARCH=$(uname -m)
40+
if [[ "$ARCH" == "x86_64" ]]; then
41+
ARCH="amd64"
42+
elif [[ "$ARCH" == "arm64" ]]; then
43+
ARCH="arm64"
44+
fi
45+
46+
# Download and install kind
47+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-${OS}-${ARCH}
48+
chmod +x ./kind
49+
sudo mv ./kind /usr/local/bin/kind
50+
51+
- name: Create Kind cluster for operator-controller
52+
run: |
53+
kind create cluster --name operator-controller
54+
55+
- name: Build the project
56+
run: |
57+
make build docker-build
58+
59+
- name: Load image into Kind cluster and deploy
60+
run: |
61+
make kind-load kind-deploy
62+
63+
- name: Logs and Details
64+
if: always()
65+
run: |
66+
# Capture high-level information
67+
echo "Gathering details for all resources in namespace olmv1-system..."
68+
kubectl get all -n olmv1-system
69+
70+
# Describe each pod in the namespace for more details
71+
for pod in $(kubectl get pods -n olmv1-system -o jsonpath='{.items[*].metadata.name}'); do
72+
echo "Describing pod $pod..."
73+
kubectl describe pod $pod -n olmv1-system
74+
echo "Logs for pod $pod:"
75+
kubectl logs $pod -n olmv1-system --all-containers=true
76+
done

0 commit comments

Comments
 (0)