ci: add formatting and Helm lint checks#384
Conversation
Signed-off-by: CYJiang <googs1025@gmail.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR expands the existing lint workflow by adding separate jobs for Go formatting checks and Helm chart linting/rendering.
Changes:
- Added a
gofmtjob that runsmake fmt-checkwhen Go-related files change. - Added a
helmjob that runsmake helm-lintand renders templates when chart-related files change.
| 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 |
| - 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 |
| - name: Lint Helm chart | ||
| if: steps.changes.outputs.helm == 'true' | ||
| run: make helm-lint |
| - name: Set up Helm | ||
| if: steps.changes.outputs.helm == 'true' | ||
| uses: azure/setup-helm@v4 |
| - name: Render Helm chart | ||
| if: steps.changes.outputs.helm == 'true' | ||
| run: make helm-template > /tmp/agentcube-rendered.yaml |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
===========================================
+ Coverage 47.57% 58.06% +10.49%
===========================================
Files 30 34 +4
Lines 2819 3181 +362
===========================================
+ Hits 1341 1847 +506
+ Misses 1338 1150 -188
- Partials 140 184 +44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LiZhenCheng9527
left a comment
There was a problem hiding this comment.
Can it be written into the Makefile?
|
|
||
| gofmt: | ||
| name: gofmt | ||
| runs-on: ubuntu-24.04 |
There was a problem hiding this comment.
suggest ubuntu-latest
What this PR does
gofmtjob to the existing lint workflow, runningmake fmt-checkfor Go formatting verification.helm-lintjob to validate the base Helm chart withmake helm-lint.make helm-templateto catch template errors without flooding CI logs.This follows up on review feedback from #383: some developer lint commands should also run in CI.
Verification
make fmt-checkmake helm-lintmake helm-template >/tmp/agentcube-rendered.yamlruby -e 'require "yaml"; YAML.load_file(".github/workflows/lint.yml")'git diff --check