-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7eba25
commit 644b858
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Helm Chart CI | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- charts/** | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Helm | ||
run: | | ||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | ||
- name: Install Helm unittest plugin | ||
run: helm plugin install https://github.com/quintush/helm-unittest | ||
|
||
- name: Update Helm dependencies | ||
run: helm dependency update ./charts/lunar-proxy | ||
|
||
- name: Run Helm unittest | ||
run: helm unittest ./charts/lunar-proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
suite: Test image configuration | ||
|
||
tests: | ||
- it: should use the pro image from GCP when pro is enabled | ||
template: templates/deployment.yaml | ||
set: | ||
pro: true | ||
image: | ||
tag: "v2.0.0" | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].image | ||
value: "us-central1-docker.pkg.dev/prj-common-442813/lunar-proxy-pro/lunar-proxy-pro:v2.0.0" | ||
|
||
- it: should use the public dockerhub image when pro is disabled | ||
template: templates/deployment.yaml | ||
set: | ||
pro: false | ||
image: | ||
tag: "v1.0.0" | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].image | ||
value: "lunarapi/lunar-proxy:v1.0.0" | ||
|
||
- it: should use default app version if image tag is not set | ||
template: templates/deployment.yaml | ||
set: | ||
pro: false | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].image | ||
value: "lunarapi/lunar-proxy:v0.8.25" # Hardcoded value from values.yaml. In reality `helm package` command in the CI pipeline would replace this with the actual appVersion |