Skip to content

Commit

Permalink
feat(ci test): add testing for helm chart (#622)
Browse files Browse the repository at this point in the history
feat: add lint-test-chart job to CI

Signed-off-by: Philipp Born <git@pborn.eu>

Signed-off-by: Philipp Born <git@pborn.eu>
  • Loading branch information
tamcore authored Dec 29, 2022
1 parent cee5af1 commit 589a6ff
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/helm/chart-testing#configuration
remote: origin
target-branch: main
chart-dirs:
- contrib/charts
helm-extra-args: --debug --timeout 60s
check-version-increment: false
validate-maintainers: false
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,49 @@ jobs:
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
./dragonfly_test --mem_defrag_threshold=0.05 # trying to catch issue with defrag
# GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test
lint-test-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3

- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: |
ct \
lint \
--config .ct.yaml \
${{github.event_name == 'workflow_dispatch' && '--all'}} ;
- if: steps.list-changed.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
name: Create kind cluster
uses: helm/kind-action@v1.5.0

- name: Run chart-testing (install)
run: |
ct \
install \
--config .ct.yaml \
--debug \
--helm-extra-set-args "--set=image.repository=ghcr.io/${{ github.repository }}" \
${{github.event_name == 'workflow_dispatch' && '--all'}} ;

0 comments on commit 589a6ff

Please sign in to comment.