Skip to content

Commit 8fd46b4

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 8fd46b4

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/install.yaml

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

0 commit comments

Comments
 (0)