-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-1746: add an helm-unittest action (#131)
- Loading branch information
Showing
2 changed files
with
47 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,34 @@ | ||
--- | ||
name: Helm Unit tests | ||
description: > | ||
Look for helm-unittest "test" folder and run the tests | ||
inputs: | ||
plugin_version: | ||
description: version of the helm-unittest plugin to install | ||
required: false | ||
default: v1.0.16 | ||
chart-dir: | ||
description: root folder of the chart | ||
required: false | ||
default: . | ||
chart-type: | ||
description: > | ||
type of chart (application or library, empty assumes application) | ||
required: false | ||
default: application | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Run Helm Unit tests | ||
shell: bash | ||
working-directory: ${{ inputs.chart-dir }} | ||
if: ${{ inputs.chart-type }} != 'library' | ||
run: | | ||
set -e | ||
if [ -d tests ]; then echo "${{ inputs.chart-dir }}: Unit tests" | ||
helm plugin install https://github.com/vbehar/helm3-unittest --version ${{ inputs.plugin_version }} | ||
helm dep up | ||
helm unittest --color . | ||
else | ||
echo "No Unit tests implemented for ${{ inputs.chart-dir }} chart!" | ||
fi |
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