Created
February 22, 2021 16:00
-
-
Save wshihadeh/8319dc87837f95bfa94f2b5e6f890511 to your computer and use it in GitHub Desktop.
Helm CI Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Test Helm chart | |
on: pull_request | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.4.0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.0.1 | |
- name: Execute Unit tests | |
run: | | |
helm unittest --color --update-snapshot . | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed) | |
if [[ -n "$changed" ]]; then | |
echo "::set-output name=changed::true" | |
fi | |
- name: Lint the chart resources | |
run: ct lint | |
- name: Create kind cluster for testing the chart | |
uses: helm/kind-action@v1.0.0 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Test chart installation | |
run: ct install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment