-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 1.62 KB
/
helm-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test Action
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
test:
name: Basic chart test using Minikube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Test whether the cluster is running
run: kubectl get pods -A
- name: Install PostgreSQL
run: helm install psql oci://registry-1.docker.io/bitnamicharts/postgresql --set global.postgresql.auth.postgresPassword=postgres
- name: Check deployment status
run: |
kubectl rollout status --watch statefulset/psql-postgresql --timeout=5m
- name: Wait for PostgreSQL database to start
run: |
for n in [ 0 1 2 3 4 5 6 7 8 9 ]
do
if kubectl logs pod/psql-postgresql-0 | grep 'database system is ready to accept connections'
then
exit 0
fi
sleep 30
done
echo PostgreSQL did not start within 300 seconds!
exit 1
- name: Install gatewayd
run: helm install gatewayd .
- name: Check deployment status
run: |
kubectl rollout status --watch deployment/gatewayd --timeout=5m
- name: Wait for gatewayd to start
run: |
for n in [ 0 1 2 3 4 5 6 7 8 9 ]
do
if kubectl get deployment gatewayd | awk '{print $2}' | grep 1/1
then
exit 0
fi
sleep 30
done
echo gatewayd did not start within 300 seconds!
exit 1