Skip to content

Composite action that installs Helm v3, helm-unittest/helm-unittest and runs unit tests for charts present in a repository or declared by the user.

License

Notifications You must be signed in to change notification settings

mintel/helm-unittest-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Helm Unit Tests Action

Composite action that installs the latest version of Helm 3 through helm's install script, the helm-unittest plugin, and then executes chart unit tests for the specified charts or for every chart in the repository.

Options

There are two optional inputs for this action:

flags

What flags to pass to the helm unittest command. By default this is -3 --color, which mean the charts will be interpreted as Helm v3 charts (as opposed to v2), and the output will always contain colors.

  • Default: "-3 --color"
  • Required: no

charts

Paths to the charts that will be tested by the action, separated by spaces. If empty, every directory containing a Chart.yaml file is assumed to be a chart and will be tested.

  • Default: ""
  • Required: no

Examples

The following example is of a CI workflow for a repository containing Helm charts. It will run helm dependency update on each chart and subsequently helm unittest -3 --color for all of them at once.

name: CI

on: pull_request

jobs:
  unittest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: d3adb5/helm-unittest-action@v1

Note that after the action itself, Helm is installed, so you can run additional Helm commands in the same action:

name: CI

on: pull_request

jobs:
  unittest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: d3adb5/helm-unittest-action@v1
      - run: helm lint my-chart

About

Composite action that installs Helm v3, helm-unittest/helm-unittest and runs unit tests for charts present in a repository or declared by the user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published