mirror of
https://github.com/plcnk/charts.git
synced 2026-04-05 17:22:21 +00:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Linting and Testing
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- "charts/**"
|
|
- ".github/workflows/**"
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- "charts/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Run chart-testing (lint)
|
|
run: ct lint --config .github/ct-lint-config.yaml
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@v4
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Run chart-testing (list-changed)
|
|
id: list-changed
|
|
run: |
|
|
changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }})
|
|
if [[ -n "$changed" ]]; then
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create kind cluster
|
|
if: steps.list-changed.outputs.changed == 'true'
|
|
uses: helm/kind-action@v1.12.0
|
|
|
|
- name: Run chart-testing (install)
|
|
if: steps.list-changed.outputs.changed == 'true'
|
|
run: ct install --config .github/ct-install-config.yaml
|