Helm Testing Workflow
This workflow provides automated testing for Helm charts, ensuring they pass linting checks using the chart-testing (ct) tool.
Usage
jobs: test-charts: uses: ZeroGachis/.github/.github/workflows/helm_testing.yaml@v4 with: charts_root_dir: "charts"
Inputs
Inputs
| Input | Type | Description | Required |
|---|---|---|---|
charts_root_dir |
string | Directory containing Helm charts to test | Yes |
target_branch |
string | Target branch to compare changes against | No |
Features
- ๐ Automated Helm chart testing
- โ Chart linting validation
- ๐ Detailed test reports
- ๐ Works as a reusable workflow
Example Usage
Basic Usage
jobs: test-charts: uses: ZeroGachis/.github/.github/workflows/helm_testing.yaml@v4 with: charts_root_dir: "charts"
Custom Chart Directory
jobs: test-charts: uses: ZeroGachis/.github/.github/workflows/helm_testing.yaml@v4 with: charts_root_dir: "helm-charts/services"
Specific Target Branch
jobs: test-charts: uses: ZeroGachis/.github/.github/workflows/helm_testing.yaml@v4 with: charts_root_dir: "charts" target_branch: "main"
How It Works
- The workflow can be called from other workflows
- Sets up Helm, Python, and chart-testing tools
- Runs chart-testing linting against the specified charts directory
- Validates charts against best practices and requirements
Implementation Details
The workflow includes the following steps:
- Checkout code - Fetches repository content with full history
- Install Helm - Sets up Helm CLI tools
- Setup Python - Installs Python environment for testing
- Setup chart-testing - Installs the chart-testing (ct) tool
- Run linting - Executes linting checks on Helm charts
Security
The workflow runs with minimal permissions:
contents: read- Read access to repository contents