name: Helm Lint and Test Charts

on:
  pull_request: {}
  push:
    branches:
      - master

jobs:
  preflight-clusterrole:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Check pre-flight clusterrole
        run: |
          cd install/kubernetes/cilium/charts
          echo "Checking for differences between preflight and agent clusterrole"
          diff \
             -I '^[ ]\{2\}name: cilium.*' \
             -I '^Keep file in synced with.*' \
             agent/templates/clusterrole.yaml \
             preflight/templates/clusterrole.yaml

  quick-install:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Check quick-install.yaml
        run: |
          cd install/kubernetes
          make all
          git diff --exit-code

  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Run helm lint
        run: |
          cd install/kubernetes/cilium
          helm lint --with-subcharts --values values.yaml

      - name: Create kind cluster
        uses: helm/kind-action@v1.0.0-rc.1
        with:
          install_local_path_provisioner: true

      # This test is just to make sure the helm chart can be installed. It will not replace existing integration tests
      - name: Run chart-testing (install)
        uses: helm/chart-testing-action@v1.0.0-rc.2
        with:
          command: install
          config: install/kubernetes/chart-testing.yaml
name: Helm Lint and Test Charts

on:
  pull_request: {}
  push:
    branches:
      - master

jobs:
  preflight-clusterrole:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Check pre-flight clusterrole
        run: |
          cd install/kubernetes/cilium/charts
          echo "Checking for differences between preflight and agent clusterrole"
          diff \
             -I '^[ ]\{2\}name: cilium.*' \
             -I '^Keep file in synced with.*' \
             agent/templates/clusterrole.yaml \
             preflight/templates/clusterrole.yaml

  quick-install:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Check quick-install.yaml
        run: |
          cd install/kubernetes
          make all
          git diff --exit-code

  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Run helm lint
        run: |
          cd install/kubernetes/cilium
          helm lint --with-subcharts --values values.yaml

      - name: Create kind cluster
        uses: helm/kind-action@v1.0.0-rc.1
        with:
          version: v0.8.1

      # This test is just to make sure the helm chart can be installed. It will not replace existing integration tests
      - name: Run chart-testing (install)
        uses: helm/chart-testing-action@v1.0.0-rc.2
        with:
          command: install
          config: install/kubernetes/chart-testing.yaml
Correct invalid input in kind-action
test(helm): Correct invalid input in kind-action

There is warning message in github action as per below.
##[warning]Unexpected input 'install_local_path_provisioner'

This option was removed as part of https://github.com/helm/kind-action/pull/16.
Underlying kind 0.7.0+ is shipped with better local storage. I take this change
to upgrade kind version to latest as well

Signed-off-by: Tam Mach <928487046a9c42ed56ed508a413e2eaabffae612@yahoo.com>
