Introduce Helm Chart unit tests #1
Workflow file for this run
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
name: PR Checks for Helm Chart | |
on: | |
pull_request: | |
env: | |
HELM_VERSION: v3.15.0 | |
UNIT_TEST_PLUGIN_VERSION: v0.5.1 | |
CHART_PATH: packaging/helm-charts/helm3/strimzi-kafka-operator | |
jobs: | |
check-pr-type: | |
runs-on: ubuntu-latest | |
outputs: | |
helm-chart: ${{ steps.filter.outputs.helm-chart }} | |
steps: | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
helm-chart: | |
- "${{ env.CHART_PATH }}" | |
helm-chart-pr-checks: | |
needs: check-pr-type | |
if: ${{ needs.check-pr-type.outputs.helm-chart == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Add Unit Test plugin to Helm | |
run: helm plugin install --version ${{ env.UNIT_TEST_PLUGIN_VERSION }} https://github.com/helm-unittest/helm-unittest | |
- name: Lint Helm Chart | |
run: helm lint ${{ env.CHART_PATH }} | |
- name: Unit Test Helm Chart | |
run: helm unittest ${{ env.CHART_PATH }} |