|
| 1 | +name: Helm Testdata Sample |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'testdata/project-v4-with-plugins/**' |
| 7 | + - 'testdata/project-v4-multigroup/**' |
| 8 | + - '.github/workflows/test-helm-samples.yml' |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - 'testdata/project-v4-with-plugins/**' |
| 12 | + - 'testdata/project-v4-multigroup/**' |
| 13 | + - '.github/workflows/test-helm-samples.yml' |
| 14 | + |
| 15 | +jobs: |
| 16 | + helm-test-project-v4-with-plugins: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + fail-fast: true |
| 20 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 21 | + steps: |
| 22 | + - name: Checkout repository |
| 23 | + uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Setup Go |
| 26 | + uses: actions/setup-go@v5 |
| 27 | + with: |
| 28 | + go-version: '~1.22' |
| 29 | + |
| 30 | + - name: Install the latest version of kind |
| 31 | + run: | |
| 32 | + curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 |
| 33 | + chmod +x ./kind |
| 34 | + sudo mv ./kind /usr/local/bin/kind |
| 35 | +
|
| 36 | + - name: Verify kind installation |
| 37 | + run: kind version |
| 38 | + |
| 39 | + - name: Create kind cluster |
| 40 | + run: kind create cluster |
| 41 | + |
| 42 | + - name: Prepare project-v4-with-plugins |
| 43 | + run: | |
| 44 | + cd testdata/project-v4-with-plugins/ |
| 45 | + go mod tidy |
| 46 | + make docker-build IMG=project-v4-with-plugins:v0.1.0 |
| 47 | + kind load docker-image project-v4-with-plugins:v0.1.0 |
| 48 | +
|
| 49 | + - name: Install Helm |
| 50 | + run: | |
| 51 | + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| 52 | +
|
| 53 | + - name: Verify Helm installation |
| 54 | + run: helm version |
| 55 | + |
| 56 | + - name: Lint Helm chart for project-v4-with-plugins |
| 57 | + run: | |
| 58 | + helm lint testdata/project-v4-with-plugins/dist/chart |
| 59 | +
|
| 60 | + - name: Install Helm chart for project-v4-with-plugins |
| 61 | + run: | |
| 62 | + helm install my-release testdata/project-v4-with-plugins/dist/chart --create-namespace --namespace project-v4-with-plugins-system |
| 63 | +
|
| 64 | + helm-test-project-v4-multigroup: |
| 65 | + runs-on: ubuntu-latest |
| 66 | + strategy: |
| 67 | + fail-fast: true |
| 68 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 69 | + steps: |
| 70 | + - name: Checkout repository |
| 71 | + uses: actions/checkout@v4 |
| 72 | + |
| 73 | + - name: Setup Go |
| 74 | + uses: actions/setup-go@v5 |
| 75 | + with: |
| 76 | + go-version: '~1.22' |
| 77 | + |
| 78 | + - name: Install the latest version of kind |
| 79 | + run: | |
| 80 | + curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 |
| 81 | + chmod +x ./kind |
| 82 | + sudo mv ./kind /usr/local/bin/kind |
| 83 | +
|
| 84 | + - name: Verify kind installation |
| 85 | + run: kind version |
| 86 | + |
| 87 | + - name: Create kind cluster |
| 88 | + run: kind create cluster |
| 89 | + |
| 90 | + - name: Prepare project-v4-multigroup |
| 91 | + run: | |
| 92 | + cd testdata/project-v4-multigroup/ |
| 93 | + go mod tidy |
| 94 | + make docker-build IMG=project-v4-multigroup:v0.1.0 |
| 95 | + kind load docker-image project-v4-multigroup:v0.1.0 |
| 96 | +
|
| 97 | + - name: Install Helm |
| 98 | + run: | |
| 99 | + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| 100 | +
|
| 101 | + - name: Verify Helm installation |
| 102 | + run: helm version |
| 103 | + |
| 104 | + - name: Lint Helm chart for project-v4-multigroup |
| 105 | + run: | |
| 106 | + helm lint testdata/project-v4-multigroup/dist/chart |
| 107 | +
|
| 108 | + - name: Install Helm chart for project-v4-multigroup |
| 109 | + run: | |
| 110 | + helm install my-release-multigroup testdata/project-v4-multigroup/dist/chart --create-namespace --namespace project-v4-multigroup-system |
0 commit comments