From 45020b095c736498693c009b9cd4f1c6bde63c3f Mon Sep 17 00:00:00 2001 From: CYJiang <86391540+googs1025@users.noreply.github.com> Date: Sat, 13 Jun 2026 20:38:34 +0800 Subject: [PATCH] ci: add formatting and helm lint checks Signed-off-by: CYJiang --- .github/workflows/lint.yml | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6e1e643b3..07a284e11 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,3 +40,59 @@ jobs: - name: Run golangci-lint if: steps.changes.outputs.lint == 'true' run: make lint + + gofmt: + name: gofmt + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Filter paths + id: changes + uses: dorny/paths-filter@v3 + with: + filters: | + gofmt: + - '**/*.go' + - 'Makefile' + - '.github/workflows/lint.yml' + + - name: Set up Go + if: steps.changes.outputs.gofmt == 'true' + uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Check Go formatting + if: steps.changes.outputs.gofmt == 'true' + run: make fmt-check + + helm: + name: helm-lint + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Filter paths + id: changes + uses: dorny/paths-filter@v3 + with: + filters: | + helm: + - 'manifests/charts/base/**' + - 'Makefile' + - '.github/workflows/lint.yml' + + - name: Set up Helm + if: steps.changes.outputs.helm == 'true' + uses: azure/setup-helm@v4 + + - name: Lint Helm chart + if: steps.changes.outputs.helm == 'true' + run: make helm-lint + + - name: Render Helm chart + if: steps.changes.outputs.helm == 'true' + run: make helm-template > /tmp/agentcube-rendered.yaml