| name: Lint and Test Charts |
| |
| on: |
| pull_request: |
| |
| jobs: |
| lint-test: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| with: |
| submodules: recursive |
| # ct needs history to compare |
| fetch-depth: 0 |
| |
| - name: Set up Helm |
| uses: azure/setup-helm@v3.0 |
| with: |
| version: v3.8.2 |
| |
| - name: Set up chart-testing |
| uses: ./.github/actions/chart-testing-action |
| |
| - name: Run chart-testing (lint) |
| run: ct lint --config ct.yaml |
| |
| - name: Run chart-testing (list-changed) |
| id: list-changed |
| run: | |
| changed=$(ct list-changed --config ct.yaml) |
| if [[ -n "$changed" ]]; then |
| echo "::set-output name=changed::true" |
| fi |
| |
| - name: Create kind cluster |
| uses: ./.github/actions/kind-action |
| if: steps.list-changed.outputs.changed == 'true' |
| |
| - name: Run chart-testing (install) |
| run: ct install --config ct.yaml |