File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy and Test Helm Charts
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ deploy-and-test :
7
+ runs-on : ubuntu-latest
8
+
9
+ steps :
10
+ - name : Checkout code
11
+ uses : actions/checkout@v2
12
+
13
+ - name : Set up Kubernetes
14
+ uses : engineerd/setup-kind@v0.5.0
15
+ with :
16
+ version : v0.11.1
17
+
18
+ - name : Setup Helm
19
+ uses : azure/setup-helm@v1
20
+ with :
21
+ version : v3.5.4
22
+
23
+ - name : Create Kubernetes cluster
24
+ run : kind create cluster --name test-cluster
25
+
26
+ - name : Helm Install
27
+ run : helm install mychart ./manifests/mychart
28
+
29
+ - name : Wait for Kubernetes resources to be ready
30
+ run : |
31
+ kubectl wait --for=condition=available --timeout=600s deployment --all
32
+ kubectl get all
33
+
34
+ - name : Run Integration Tests
35
+ run : |
36
+ # Example integration test commands
37
+ # Replace these with your actual integration test commands
38
+ kubectl get pods
39
+ kubectl get services
40
+ # You can add curl or other commands to test the endpoints
41
+ # For example:
42
+ # POD_NAME=$(kubectl get pods -l app=mychart -o jsonpath="{.items[0].metadata.name}")
43
+ # kubectl exec $POD_NAME -- curl -f http://localhost:8080/healthz
44
+
45
+ - name : Delete Kubernetes cluster
46
+ run : kind delete cluster --name test-cluster
You can’t perform that action at this time.
0 commit comments