Skip to content

ci: add formatting and Helm lint checks#384

Open
googs1025 wants to merge 1 commit into
volcano-sh:mainfrom
googs1025:add-ci-dev-lint-checks
Open

ci: add formatting and Helm lint checks#384
googs1025 wants to merge 1 commit into
volcano-sh:mainfrom
googs1025:add-ci-dev-lint-checks

Conversation

@googs1025

Copy link
Copy Markdown
Member

What this PR does

  • Adds a gofmt job to the existing lint workflow, running make fmt-check for Go formatting verification.
  • Adds a helm-lint job to validate the base Helm chart with make helm-lint.
  • Renders the base Helm chart with make helm-template to catch template errors without flooding CI logs.
  • Uses path filters so these checks only run for relevant Go, chart, Makefile, or workflow changes.

This follows up on review feedback from #383: some developer lint commands should also run in CI.

Verification

  • make fmt-check
  • make helm-lint
  • make helm-template >/tmp/agentcube-rendered.yaml
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/lint.yml")'
  • git diff --check

Signed-off-by: CYJiang <googs1025@gmail.com>
Copilot AI review requested due to automatic review settings June 13, 2026 12:39
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 gofmt job that runs make fmt-check when Go-related files change.
  • Added a helm job that runs make helm-lint and renders templates when chart-related files change.

Comment on lines +44 to +53
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
Comment on lines +67 to +80
- 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
Comment on lines +92 to +94
- name: Lint Helm chart
if: steps.changes.outputs.helm == 'true'
run: make helm-lint
Comment on lines +88 to +90
- name: Set up Helm
if: steps.changes.outputs.helm == 'true'
uses: azure/setup-helm@v4
Comment on lines +96 to +98
- name: Render Helm chart
if: steps.changes.outputs.helm == 'true'
run: make helm-template > /tmp/agentcube-rendered.yaml
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.06%. Comparing base (524e55e) to head (45020b0).
⚠️ Report is 125 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     
Flag Coverage Δ
unittests 58.06% <ø> (+10.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LiZhenCheng9527 LiZhenCheng9527 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be written into the Makefile?


gofmt:
name: gofmt
runs-on: ubuntu-24.04

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest ubuntu-latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants