Feature/improvements and bugfixes (#14) #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |