test: add kubewarden-controller webhooks unit test #1327
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: CI | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Helm | |
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | |
- name: Install helm-unittest | |
run: helm plugin install https://github.com/helm-unittest/helm-unittest | |
- name: Assemble list of chart directories to test | |
run: | | |
find . -type f -name 'Chart.yaml' -exec dirname {} \; > charts-to-test | |
shell: bash | |
- name: Fetch chart dependencies | |
run: | | |
for chart in $(cat charts-to-test); do | |
helm dependency update "$chart" | |
done | |
shell: bash | |
- name: Run unit tests | |
run: helm unittest $(cat charts-to-test) | |
shell: bash | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Check that the contents of common-values.yaml are included in values.yaml | |
run: | | |
make check-common-values | |
- name: Run shellcheck in the shell scripts | |
run: | | |
make shellcheck |