• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A GitHub Action to lint and test Helm charts

chart-testing Action

A GitHub Action for installing the helm/chart-testing CLI tool.

Usage

Pre-requisites

  1. A GitHub repo containing a directory with your Helm charts (e.g: charts)
  2. 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

  • version: The chart-testing version to install (default: 3.9.0)
  • yamllint_version: The chart-testing version to install (default: 1.27.1)
  • yamale_version: The chart-testing version to install (default: 3.0.4)

Example Workflow

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

Note that Helm and Python must be installed. This can be achieved using actions as shown in the example below. Python is required because ct lint runs Yamale and yamllint which require Python.

name: Lint and Test Charts

on: pull_request

jobs:
  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Set up Helm
        uses: azure/setup-helm@v3
        with:
          version: v3.12.1

      - uses: actions/setup-python@v4
        with:
          python-version: '3.9'
          check-latest: true

      - name: Set up chart-testing
        uses: helm/[email protected]

      - name: Run chart-testing (list-changed)
        id: list-changed
        run: |
          changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
          if [[ -n "$changed" ]]; then
            echo "changed=true" >> "$GITHUB_OUTPUT"
          fi

      - name: Run chart-testing (lint)
        if: steps.list-changed.outputs.changed == 'true'
        run: ct lint --target-branch ${{ github.event.repository.default_branch }}

      - name: Create kind cluster
        if: steps.list-changed.outputs.changed == 'true'
        uses: helm/[email protected]

      - name: Run chart-testing (install)
        if: steps.list-changed.outputs.changed == 'true'
        run: ct install --target-branch ${{ github.event.repository.default_branch }}

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

Upgrading from v1.x.x

v2.0.0 is a major release with breaking changes. The action no longer wraps the chart-testing tool but simply installs it. It is no longer run in a Docker container. All ct options are now directly available without the additional abstraction layer.

Code of conduct

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

More Repositories

1

helm

The Kubernetes Package Manager
Go
26,750
star
2

charts

⚠️(OBSOLETE) Curated applications for Kubernetes
Go
15,492
star
3

chartmuseum

helm chart repository server
Go
3,484
star
4

monocular

⚠️(OBSOLETE) Search and discovery UI for Helm Chart repositories
Go
1,421
star
5

chart-testing

CLI tool for linting and testing Helm charts
Go
1,355
star
6

helm-mapkubeapis

This is a Helm plugin which map deprecated or removed Kubernetes APIs in a release to supported APIs
Go
857
star
7

chart-releaser

Hosting Helm Charts via GitHub Pages and Releases
Go
652
star
8

helm-classic

⚠️(OBSOLETE) Helm Classic v1
Go
575
star
9

chart-releaser-action

A GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool
Shell
530
star
10

helm-2to3

⚠️(OBSOLETE) This is a Helm v3 plugin which migrates and cleans up Helm v2 configuration and releases in-place to Helm v3
Go
494
star
11

community

Helm community content
413
star
12

kind-action

A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes
Shell
274
star
13

hub

⚠️(OBSOLETE) Former distributed charts search for hub.helm.sh. Now see https://artifacthub.io/
250
star
14

helm-www

The Helm website for docs, blog and project info.
SCSS
195
star
15

charts-classic

⚠️(OBSOLETE) Charts for Helm Classic v1
Shell
140
star
16

charts-repo-actions-demo

Example project to demo testing and hosting a chart repository with GitHub Pages and Actions
Mustache
104
star
17

examples

Helm chart repository for example charts
Smarty
59
star
18

helm-summit-notes

Helm Summit notes from February 2018
25
star
19

acceptance-testing

Acceptance test suite for the Helm client
Shell
24
star
20

prow

⚠️(OBSOLETE) Developer utilities for Helm
20
star
21

rudder-federation

⚠️(OBSOLETE) Federation support as a Tiller plugin
Go
18
star
22

charts-tooling

Tooling to support github.com/helm/charts
Go
10
star
23

pull-sizer

Label pull requests based on the size of their changes
Go
8
star
24

docker-kubectl-helm-az

⚠️(OBSOLETE) Azure CLI Dockerfile with kubectl and Helm
Dockerfile
8
star
25

rudder-appcontroller

⚠️(OBSOLETE) The AppController backend for Tiller
Go
7
star
26

docker-kubectl-helm-aws

⚠️(OBSOLETE) AWS CLI Dockerfile with kubectl and Helm
Dockerfile
7
star
27

get-helm-sh

Azure ARM templates to deploy https://get.helm.sh
5
star
28

homebrew-tap

Homebrew Formulas for Helm Tools
Ruby
5
star
29

specs

Specifications for Helm interfaces including charts and repositories
5
star
30

query-store-quay-logs

Go
4
star
31

repo-audit

Repo Auditing tool - pre-alpha status
Go
4
star
32

github-webhook-dco-labeler

Utility application used by Helm charts to add a label to pulls when DCO passes
Go
4
star
33

charts-check-pr-title

Go
3
star
34

get-helm

⚠️(OBSOLETE) Install script for Helm Classic v1
Shell
2
star