|
| 1 | +# Copyright (c) 2026 Electronic Arts Inc. All rights reserved. |
| 2 | + |
| 3 | +name: Helm CI |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + paths: |
| 9 | + - 'helm/**' |
| 10 | + - '.github/ct.yaml' |
| 11 | + - '.github/workflows/helm-ci.yaml' |
| 12 | + push: |
| 13 | + branches: [main] |
| 14 | + paths: |
| 15 | + - 'helm/**' |
| 16 | + - '.github/ct.yaml' |
| 17 | + - '.github/workflows/helm-ci.yaml' |
| 18 | + |
| 19 | +permissions: |
| 20 | + contents: read |
| 21 | + |
| 22 | +jobs: |
| 23 | + lint: |
| 24 | + name: Lint |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v4 |
| 28 | + with: |
| 29 | + fetch-depth: 0 |
| 30 | + |
| 31 | + - name: Set up Helm |
| 32 | + uses: azure/setup-helm@v4 |
| 33 | + with: |
| 34 | + version: "3.17.0" |
| 35 | + |
| 36 | + - name: Set up chart-testing |
| 37 | + uses: helm/chart-testing-action@v2 |
| 38 | + |
| 39 | + - name: helm lint |
| 40 | + run: helm lint ./helm |
| 41 | + |
| 42 | + - name: Render examples |
| 43 | + run: | |
| 44 | + helm template grpc-studio ./helm -f helm/examples/basic/values.yaml > /dev/null |
| 45 | + helm template grpc-studio ./helm -f helm/examples/nginx-ingress/values.yaml > /dev/null |
| 46 | + helm template grpc-studio ./helm -f helm/examples/istio/values.yaml > /dev/null |
| 47 | +
|
| 48 | + - name: ct lint |
| 49 | + run: ct lint --config .github/ct.yaml |
| 50 | + |
| 51 | + install: |
| 52 | + name: Install test |
| 53 | + runs-on: ubuntu-latest |
| 54 | + needs: lint |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + with: |
| 58 | + fetch-depth: 0 |
| 59 | + |
| 60 | + - name: Set up Helm |
| 61 | + uses: azure/setup-helm@v4 |
| 62 | + with: |
| 63 | + version: "3.17.0" |
| 64 | + |
| 65 | + - name: Set up chart-testing |
| 66 | + uses: helm/chart-testing-action@v2 |
| 67 | + |
| 68 | + - name: Set up Docker Buildx |
| 69 | + uses: docker/setup-buildx-action@v3 |
| 70 | + |
| 71 | + - name: Build backend image |
| 72 | + uses: docker/build-push-action@v6 |
| 73 | + with: |
| 74 | + context: . |
| 75 | + file: docker/backend/Dockerfile |
| 76 | + load: true |
| 77 | + tags: grpc-studio-backend:ci |
| 78 | + cache-from: type=gha,scope=backend |
| 79 | + cache-to: type=gha,scope=backend,mode=max |
| 80 | + |
| 81 | + - name: Build frontend image |
| 82 | + uses: docker/build-push-action@v6 |
| 83 | + with: |
| 84 | + context: . |
| 85 | + file: docker/frontend/Dockerfile |
| 86 | + load: true |
| 87 | + tags: grpc-studio-frontend:ci |
| 88 | + cache-from: type=gha,scope=frontend |
| 89 | + cache-to: type=gha,scope=frontend,mode=max |
| 90 | + |
| 91 | + - name: Create kind cluster |
| 92 | + uses: helm/kind-action@v1 |
| 93 | + with: |
| 94 | + cluster_name: kind |
| 95 | + |
| 96 | + - name: Load images into kind |
| 97 | + run: | |
| 98 | + kind load docker-image grpc-studio-backend:ci |
| 99 | + kind load docker-image grpc-studio-frontend:ci |
| 100 | +
|
| 101 | + - name: ct install |
| 102 | + run: > |
| 103 | + ct install |
| 104 | + --config .github/ct.yaml |
| 105 | + --all |
| 106 | + --helm-extra-set-args " |
| 107 | + --set backend.image.repository=grpc-studio-backend |
| 108 | + --set backend.image.tag=ci |
| 109 | + --set backend.image.pullPolicy=Never |
| 110 | + --set frontend.image.repository=grpc-studio-frontend |
| 111 | + --set frontend.image.tag=ci |
| 112 | + --set frontend.image.pullPolicy=Never |
| 113 | + --set connection.target.host=my-grpc-server |
| 114 | + --set connection.target.port=50051 |
| 115 | + --set connection.mode=plaintext |
| 116 | + " |
0 commit comments