Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 9 additions & 27 deletions .github/workflow/ci.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +38,7 @@ jobs:
cache: true

- name: Build
run: go build -v ./...
run: make build

test:
name: Test
Expand All @@ -51,32 +52,13 @@ 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
with:
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

13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 ./...
Loading