Skip to content

Commit bbf7bd5

Browse files
authored
Bugfix/lint workflow (CloudPirates-io#362)
* Fix invalid caching in github workflow * fix invalid testing script
1 parent 1012879 commit bbf7bd5

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CI test values for clusterpirate chart
2+
# This file provides minimal required configuration for chart testing
3+
4+
auth:
5+
# Provide a test access token for CI testing
6+
accessToken: "test-token-for-ci-only"
7+
8+
# Disable Valkey dependency for faster CI testing
9+
valkey:
10+
enabled: false
11+
12+
# Configure cache to not require Valkey
13+
clusterPirate:
14+
metrics:
15+
cache:
16+
host: "localhost"
17+
password: ""

test-charts.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,17 @@ test_chart() {
161161

162162
# Test template rendering
163163
echo "📝 Testing template rendering..."
164-
if ! helm template test-release . --debug > /tmp/rendered-$chart.yaml; then
164+
165+
# Check for CI values files
166+
CI_VALUES_ARGS=""
167+
if [ -d "ci" ] && [ "$(ls -A ci/*.yaml 2>/dev/null)" ]; then
168+
echo "📋 Found CI values files, using them for testing"
169+
for values_file in ci/*.yaml; do
170+
CI_VALUES_ARGS="$CI_VALUES_ARGS -f $values_file"
171+
done
172+
fi
173+
174+
if ! helm template test-release . $CI_VALUES_ARGS --debug > /tmp/rendered-$chart.yaml; then
165175
echo -e "${RED}❌ Template rendering failed for $chart${NC}"
166176
return 1
167177
fi
@@ -193,9 +203,10 @@ test_chart() {
193203
# Install chart
194204
local namespace="test-$chart"
195205
local release_name="test-$chart"
196-
206+
197207
echo "🚀 Installing chart..."
198208
if ! helm install "$release_name" . \
209+
$CI_VALUES_ARGS \
199210
--create-namespace \
200211
--namespace "$namespace" \
201212
--wait \
@@ -225,7 +236,7 @@ test_chart() {
225236

226237
# Test upgrade
227238
echo "🔄 Testing chart upgrade..."
228-
if ! helm upgrade "$release_name" . -n "$namespace" --wait --timeout=300s; then
239+
if ! helm upgrade "$release_name" . $CI_VALUES_ARGS -n "$namespace" --wait --timeout=300s; then
229240
echo -e "${YELLOW}⚠️ Chart upgrade failed for $chart${NC}"
230241
fi
231242

0 commit comments

Comments
 (0)