Skip to content

Commit b150f42

Browse files
committed
test(chart): Add minimal integration test using kind and ct
1 parent c9f6ba5 commit b150f42

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.github/workflows/publish-helm-chart.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,37 @@ jobs:
2929
- name: Run Helm Unit Tests
3030
run: helm unittest chart --strict
3131

32+
- name: Create kind cluster
33+
uses: helm/kind-action@v1
34+
with:
35+
cluster_name: kind
36+
37+
- uses: docker/build-push-action@v6
38+
name: Build current image as base for Angular example
39+
with:
40+
context: .
41+
push: false
42+
pull: true
43+
tags: "codecentric/single-page-application-server:1-nginx-stable-alpine"
44+
build-args: NGINX_TAG=stable-alpine
45+
46+
- uses: docker/build-push-action@v6
47+
name: Build Angular example image
48+
with:
49+
context: examples/angular
50+
push: false
51+
pull: false
52+
tags: "angular-example:latest"
53+
54+
- name: Copy image to kind node
55+
run: kind load docker-image "angular-example:latest"
56+
57+
- name: Set up chart-testing
58+
uses: helm/chart-testing-action@v2
59+
60+
- name: Run chart-testing in kind
61+
run: ct install --config chart/ci/ct.yaml
62+
3263
- name: Package Helm Chart
3364
run: helm package chart -u --version ${{ steps.get_latest_version.outputs.version }} --destination .
3465

chart/ci/ct-values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pod:
2+
container:
3+
image:
4+
repository: angular-example
5+
tag: latest
6+
pullPolicy: IfNotPresent

chart/ci/ct.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
charts: "chart"
2+
validate-maintainers: true
3+
validate-yaml: true
4+
debug: true

0 commit comments

Comments
 (0)