Skip to content

HexF/chart-testing-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

chart-testing Action

A GitHub Action to lint and test Helm charts, using the helm/chart-testing CLI tool.

Usage

Pre-requisites

  1. A GitHub repo containing a directory with your Helm charts (eg: /charts)
  2. Optional: if you want to override the defaults, a chart-testing config file in your GitHub repo (eg. /ct.yaml)
  3. A workflow YAML file in your .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file

Inputs

For more information on inputs, see the API Documentation

  • image: The chart-testing Docker image to use (default: quay.io/helmpack/chart-testing:v2.4.0)
  • config: The path to the config file
  • command: The chart-testing command to run
  • kubeconfig: The path to the kube config file

Example Workflow

Create a workflow (eg: .github/workflows/lint-test.yaml):

name: Lint and Test Charts

on: pull_request

jobs:
  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Run chart-testing (lint)
        id: lint
        uses: HexF/chart-testing-action@v3.0.0
        with:
          command: lint

      - name: Create kind cluster
        uses: helm/kind-action@v1.0.0-alpha.3
        with:
          install_local_path_provisioner: true
        # Only build a kind cluster if there are chart changes to test.
        if: steps.lint.outputs.changed == 'true'

      - name: Run chart-testing (install)
        uses: HexF/chart-testing-action@v3.0.0
        with:
          command: install

This uses @helm/kind-action GitHub Action to spin up a kind Kubernetes cluster, and @helm/chart-testing-action to lint and test your charts on every Pull Request.

Code of conduct

Participation in the Helm community is governed by the Code of Conduct.

About

A GitHub Action to lint and test Helm charts

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • Shell 86.7%
  • JavaScript 13.3%