Skip to content

Commit

Permalink
Add workflow to test chart
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Nov 13, 2023
1 parent e784910 commit 6572c4f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/helm-chart-test-overrideName.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Helm Charts Set Component OverrideName

on:
workflow_dispatch:
push:
paths:
- 'charts/selenium-grid/templates/*'
pull_request:
paths:
- 'charts/selenium-grid/templates/*'

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.13.2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]

- name: Build chart dependencies
run: |
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm dependency build charts/selenium-grid
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind cluster
uses: helm/[email protected]

- name: Run chart-testing (install)
run: ct install --config tests/ChartTests/ct-nameOverride.yaml --target-branch ${{ github.event.repository.default_branch }}
4 changes: 4 additions & 0 deletions tests/ChartTests/ct-nameOverride.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
chart-dirs:
- charts/selenium-grid
helm-extra-args: --set-string hub.nameOverride=my-hub-name --set-string chromeNode.nameOverride=my-chrome-name --set-string firefoxNode.nameOverride=my-firefox-name --set-string edgeNode.nameOverride=my-edge-name
check-version-increment: false

0 comments on commit 6572c4f

Please sign in to comment.