Skip to content

feat: add unified CI automation targets to Makefile#417

Open
yoursanonymous wants to merge 1 commit into
karmada-io:mainfrom
yoursanonymous:ci-automation
Open

feat: add unified CI automation targets to Makefile#417
yoursanonymous wants to merge 1 commit into
karmada-io:mainfrom
yoursanonymous:ci-automation

Conversation

@yoursanonymous

Copy link
Copy Markdown
Contributor

Introduced standard targets: lint, fmt, test, and verify to provide a consistent interface for local development and CI pipelines. These targets wrap existing project scripts and standard Go tools.

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR introduces standard automation targets to the Makefile to unify the development.

Which issue(s) this PR fixes:
Fixes #416

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Added standard Makefile targets (lint, fmt, test, verify) for better developer automation across all Go components.

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 8, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @yoursanonymous, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the project's development workflow by integrating a set of standardized automation targets into the Makefile. The goal is to create a unified and consistent interface for common development tasks such as code linting, formatting, and testing, thereby streamlining both local development and continuous integration processes.

Highlights

  • Unified CI Automation Targets: Introduced new Makefile targets: lint, fmt, test, and verify, to standardize automation for continuous integration and local development.
  • Standardized Development Workflow: These targets provide a consistent interface for common development tasks, ensuring uniformity across the project.
  • Integration with Existing Tools: The new targets wrap existing project scripts (e.g., hack/verify-staticcheck.sh) and standard Go tools (go fmt, go test) for their respective functions.
Changelog
  • Makefile
    • Added a new 'Quality & Test' section to organize related targets.
    • Introduced a verify target that orchestrates lint and test commands.
    • Created a lint target which calls lint-api for comprehensive linting.
    • Defined lint-api to execute hack/verify-staticcheck.sh for static analysis of Go code.
    • Added an fmt target to format Go source files located in pkg/... and cmd/... using go fmt.
    • Implemented a test target that invokes test-api for running tests.
    • Established test-api to run Go unit tests for pkg/... and cmd/... using go test -v.
Activity
  • The pull request introduces new features to the project.
  • It addresses and fixes issue Standardize CI automation with Makefile targets #416.
  • The author, yoursanonymous, has submitted the initial changes.
  • No specific review comments or further activity have been recorded yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces standard Makefile targets (lint, fmt, test, verify) to unify the development and CI workflow, which is a great improvement. The implementation is clean and follows standard practices. I have one suggestion to enhance maintainability by using a variable for Go package paths to avoid hardcoding them.

Comment thread Makefile
Comment on lines +117 to +128
.PHONY: fmt
fmt:
go fmt ./pkg/... ./cmd/...

# Run all unit tests
.PHONY: test
test: test-api

# Run Go unit tests
.PHONY: test-api
test-api:
go test -v ./pkg/... ./cmd/...

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve maintainability and avoid repetition, it's a good practice to define a variable for the list of Go packages and use it in both the fmt and test-api targets.

You can add the following variable definition at the top of the Quality & Test section (e.g., at line 102):

GO_PACKAGES := ./pkg/... ./cmd/...

This change makes it easier to update package paths in the future.

.PHONY: fmt
fmt:
	go fmt $(GO_PACKAGES)

# Run all unit tests
.PHONY: test
test: test-api

# Run Go unit tests
.PHONY: test-api
test-api:
	go test -v $(GO_PACKAGES)

@warjiang

warjiang commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

/assign

@karmada-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 ask for approval from warjiang. For more information see the 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

Introduced standard targets: lint, fmt, test, and verify to provide a consistent interface for local development and CI pipelines. These targets wrap existing project scripts and standard Go tools.

Signed-off-by: vinayak sharma <vinayaks0111@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize CI automation with Makefile targets

3 participants