-
Notifications
You must be signed in to change notification settings - Fork 84
41 lines (34 loc) · 1.06 KB
/
test-charts.yaml
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
name: Install and Test Helm Chart
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: kind
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.5.4
- name: Install yq
run: |
sudo snap install yq
- name: Install and test Redis Related Helm charts
run: |
kubectl cluster-info --context kind-kind
chart_dirs=("redis-operator" "redis" "redis-cluster" "redis-replication" "redis-sentinel")
for dir in "${chart_dirs[@]}"
do
if [[ -f ./charts/$dir/Chart.yaml ]]; then
helm dependency update ./charts/$dir/
fi
chart_version=$(yq e .version ./charts/$dir/Chart.yaml)
echo "Installing $dir chart with version $chart_version..."
helm install $dir ./charts/$dir/
helm test $dir
done
echo "Listing installed Helm charts..."