From 665fd4a2bd052b4faa5ac2857cbaf6668b92c2fb Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Sun, 22 Feb 2026 11:45:54 +0800 Subject: [PATCH 1/2] Rename dir of github workflow. Signed-off-by: Klaus Ma --- .github/{workflow => workflows}/ci.yaml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) rename .github/{workflow => workflows}/ci.yaml (70%) diff --git a/.github/workflow/ci.yaml b/.github/workflows/ci.yaml similarity index 70% rename from .github/workflow/ci.yaml rename to .github/workflows/ci.yaml index 88b802a..b10559b 100644 --- a/.github/workflow/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,23 +60,4 @@ jobs: name: coverage path: coverage.out - verify-codegen: - name: Verify Codegen - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.21' - cache: true - - - name: Verify manifests - run: | - if [ -f Makefile ]; then - make manifests - git diff --exit-code config/ - else - echo "No Makefile found, skipping codegen verification" - fi + From f056db20b4d05d680295b6fc732d9fe712c02f0e Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Sun, 22 Feb 2026 12:08:30 +0800 Subject: [PATCH 2/2] A Makefile for CI flow. Signed-off-by: Klaus Ma --- .github/workflows/ci.yaml | 15 ++++++++------- Makefile | 13 +++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b10559b..38c35a5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,11 @@ jobs: go-version: '1.21' cache: true - - name: golangci-lint - uses: golangci/golangci-lint-action@v4 - with: - version: latest + - name: Install golangci-lint + run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + + - name: Lint + run: make lint build: name: Build @@ -37,7 +38,7 @@ jobs: cache: true - name: Build - run: go build -v ./... + run: make build test: name: Test @@ -51,8 +52,8 @@ jobs: go-version: '1.21' cache: true - - name: Run tests - run: go test -v -race -coverprofile=coverage.out ./... + - name: Test + run: make test - name: Upload coverage uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..53de52c --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: lint build test + +# Run golangci-lint +lint: + golangci-lint run ./... + +# Build all packages +build: + go build -v ./... + +# Run tests with race detection and coverage +test: + go test -v -race -coverprofile=coverage.out ./...