@@ -22,11 +22,16 @@ jobs:
2222 with :
2323 version : ${{ env.HELM_VERSION }}
2424
25- - name : Run Helm unit tests
26- run : make tests
25+ - name : Install helm unittest plugin
26+ run : helm plugin install https://github.com/helm-unittest/helm-unittest
2727
28- integration :
29- name : Integration Tests (K3s)
28+ - run : |
29+ cd charts
30+ helm unittest eoapi -f 'tests/*.yaml' -v eoapi/test-helm-values.yaml
31+ # Run autoscaling-specific unit tests
32+ helm unittest eoapi -f 'tests/autoscaling_tests.yaml'
33+
34+ k3s-integration-tests :
3035 if : github.event.pull_request.head.repo.full_name == github.repository
3136 permissions :
3237 contents : ' read'
@@ -49,86 +54,29 @@ jobs:
4954
5055 - name : Deploy eoAPI
5156 id : deploy
52- continue-on-error : true
5357 run : |
5458 echo "=== Starting eoAPI deployment ==="
5559 export RELEASE_NAME="$RELEASE_NAME"
60+ export NAMESPACE="default"
5661 export PGO_VERSION="${{ env.PGO_VERSION }}"
5762 export GITHUB_SHA="${{ github.sha }}"
5863 ./scripts/deploy.sh --ci
5964
60- - name : Check deployment status
61- id : check
62- if : steps.deploy.outcome == 'success'
63- run : |
64- echo "=== Checking deployment status ==="
65- export RELEASE_NAME="$RELEASE_NAME"
66- ./scripts/test.sh check-deployment --debug
67-
68- - name : Debug pgstac jobs if deployment failed
69- if : steps.deploy.outcome == 'failure'
70- continue-on-error : true
71- run : |
72- echo "=== Debugging pgstac job failures ==="
73-
74- # Check pgstac-migrate job
75- echo "===== pgstac-migrate Job Status ====="
76- kubectl get jobs -l app.kubernetes.io/name=pgstac-migrate -o wide || echo "No pgstac-migrate jobs found"
77-
78- MIGRATE_PODS=$(kubectl get pods -l app.kubernetes.io/name=pgstac-migrate -o jsonpath='{.items[*].metadata.name}' 2>/dev/null)
79- if [ -n "$MIGRATE_PODS" ]; then
80- for POD in $MIGRATE_PODS; do
81- echo "--- Logs from migrate pod $POD ---"
82- kubectl logs "$POD" --tail=100 || true
83- echo "--- Description of migrate pod $POD ---"
84- kubectl describe pod "$POD"
85- done
86- fi
87-
88- # Check pgstac-load-samples job
89- echo "===== pgstac-load-samples Job Status ====="
90- kubectl get jobs -l app.kubernetes.io/name=pgstac-load-samples -o wide || echo "No pgstac-load-samples jobs found"
91-
92- SAMPLES_PODS=$(kubectl get pods -l app.kubernetes.io/name=pgstac-load-samples -o jsonpath='{.items[*].metadata.name}' 2>/dev/null)
93- if [ -n "$SAMPLES_PODS" ]; then
94- for POD in $SAMPLES_PODS; do
95- echo "--- Logs from samples pod $POD ---"
96- kubectl logs "$POD" --tail=100 || true
97- echo "--- Description of samples pod $POD ---"
98- kubectl describe pod "$POD"
99- done
100- fi
101-
102- # Check database status
103- echo "===== Database Pod Status ====="
104- kubectl get pods -l postgres-operator.crunchydata.com/cluster -o wide
105- kubectl get postgrescluster -o wide
106-
107- # Check ConfigMaps
108- echo "===== Relevant ConfigMaps ====="
109- kubectl get configmaps | grep -E "initdb|pgstac" || echo "No relevant configmaps found"
110-
111- # Check for any related events
112- echo "===== Related Kubernetes Events ====="
113- kubectl get events | grep -E "pgstac|initdb" || echo "No relevant events found"
114-
115- exit 1
116-
11765 - name : Run integration tests
118- if : steps.deploy.outcome == 'success'
11966 run : |
12067 echo "=== Running integration tests ==="
12168 export RELEASE_NAME="$RELEASE_NAME"
69+ export NAMESPACE="default"
12270 ./scripts/test.sh integration --debug
12371
124- - name : Debug deployment status
125- if : always ()
72+ - name : Debug failed deployment
73+ if : failure ()
12674 run : |
127- echo "=== Final Deployment Status ==="
75+ echo "=== Deployment failed - collecting debug information ==="
12876 kubectl get pods -o wide
12977 kubectl get jobs -o wide
13078 kubectl get services -o wide
131- kubectl get ingress
79+ kubectl get events --sort-by='.lastTimestamp' | tail -20 || true
13280
13381
13482 - name : Cleanup
0 commit comments