Skip to content

Commit

Permalink
test(chart): Add minimal integration test using kind and ct
Browse files Browse the repository at this point in the history
  • Loading branch information
PSanetra committed Aug 9, 2024
1 parent c9f6ba5 commit 0e725c2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,34 @@ jobs:
- name: Run Helm Unit Tests
run: helm unittest chart --strict

- name: Create kind cluster
uses: helm/kind-action@v1

- uses: docker/build-push-action@v6
name: Build current image as base for Angular example
if: ${{ steps.target_tags.outputs.tags != '' }}
with:
context: .
push: false
pull: true
tags: "codecentric/single-page-application-server:1-nginx-stable-alpine"
build-args: NGINX_TAG=stable-alpine

- uses: docker/build-push-action@v6
name: Build Angular example image
if: ${{ steps.target_tags.outputs.tags != '' }}
with:
context: examples/angular
push: false
pull: false
tags: "angular-example:latest"

- name: Copy image to kind node
run: kind load docker-image "angular-example:latest"

- name: Run chart-testing in kind
run: ct install --config chart/ci/ct.yaml

- name: Package Helm Chart
run: helm package chart -u --version ${{ steps.get_latest_version.outputs.version }} --destination .

Expand Down
6 changes: 6 additions & 0 deletions chart/ci/ct-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pod:
container:
image:
repository: angular-example
tag: latest
pullPolicy: IfNotPresent
4 changes: 4 additions & 0 deletions chart/ci/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
charts: "chart"
validate-maintainers: true
validate-yaml: true
debug: true

0 comments on commit 0e725c2

Please sign in to comment.