chart-testing-action

helmApache-2.0活跃维护

在 GitHub Actions 里自动对 Helm chart 做 lint 和测试,帮你在 CI 阶段提前发现模板错误和配置问题。

A GitHub Action to lint and test Helm charts

v2.9.0发布于 2026-10-09 12:03 UTC294star90fork同步于 2026-11-10 06:05 UTC

怎么上手

README 里没有找到可直接复制的安装命令

README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。

硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v2.9.0
  1. v2.9.0最新正式版2026-10-09 · 2026-10-09 12:03 UTC

    What's Changed

    New Contributors

  2. v2.8.02025-11-05 · 2025-11-05 12:13 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/helm/chart-testing-action/compare/v2...v2.8.0

  3. v2.7.02025-01-20 · 2025-01-20 11:06 UTC
    查看更新说明

    For ct change see https://github.com/helm/chart-testing/releases/tag/v3.12.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/helm/chart-testing-action/compare/v2.6.1...v2.7.0

  4. v2.6.12023-11-03 · 2023-11-03 12:53 UTC
    查看更新说明
  5. v2.6.02023-10-31 · 2023-10-31 14:43 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/helm/chart-testing-action/compare/v2...v2.6.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.15.0)
    • yamllint_version: The yamllint version to install (default: 1.33.0)
    • yamale_version: The yamale version to install (default: 6.0.0)
    • lint_config: Path to a custom yamllint config file. If set, ct lint uses it instead of the default lintconf.yaml (default: none)

    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
    
    permissions: {}
    
    jobs:
      lint-test:
        runs-on: ubuntu-latest
        permissions:
          contents: read
        steps:
          - name: Checkout
            uses: actions/[email protected]
            with:
              fetch-depth: 0
    
          - name: Set up Helm
            uses: azure/[email protected]
    
          - uses: actions/[email protected]
            with:
              python-version: '3.x'
              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.

    Testing charts that use CRDs

    If your chart renders custom resources for CRDs that are not installed by the chart itself, install those CRDs after the kind cluster is created and before running ct install. For example, if your repository stores the required CRD manifests in a crds/ directory:

          - name: Create kind cluster
            if: steps.list-changed.outputs.changed == 'true'
            uses: helm/[email protected]
    
          - name: Install test CRDs
            if: steps.list-changed.outputs.changed == 'true'
            run: kubectl apply -f crds/
    
          - name: Run chart-testing (install)
            if: steps.list-changed.outputs.changed == 'true'
            run: ct install --target-branch ${{ github.event.repository.default_branch }}
    

    The helm/kind-action step configures kubectl for the kind cluster, so later workflow steps can apply CRDs or other cluster prerequisites before chart installation.

    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.