Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello golang@1.24 #18

Merged
merged 1 commit into from
Feb 22, 2025
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
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/cache@v4
id: cache-makefile
with:
path: ~/go/bin
key: ${{ runner.os }}-makefile-${{ hashFiles('Makefile') }}-${{ hashFiles('cmd') }}-${{ hashFiles('go.mod') }}

- name: dependencies
if: steps.cache-makefile.outputs.cache-hit != 'true'
run: |
make install-tools

- name: lint
run: |
Expand Down
19 changes: 7 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
.PHONY: install-tools
install-tools:
go install ./cmd/protoc-gen-go-protobq
go install github.com/bufbuild/buf/cmd/buf@v1.47.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

.PHONY: test
test:
go test -v ./...

.PHONY: format
format:
go fmt ./...
golangci-lint run --issues-exit-code=0 --fix ./...
buf format --write
go tool golangci-lint run --issues-exit-code=0 --fix ./...
go tool buf format --write

BREAKING_CHANGE_BASE_BRANCH?=develop
.PHONY: lint
lint:
golangci-lint run --issues-exit-code=1 ./...
buf lint
go tool golangci-lint run --issues-exit-code=1 ./...
go tool buf lint
# buf breaking --against '.git#branch=$(BREAKING_CHANGE_BASE_BRANCH)'

.PHONY: codegen
codegen: install-tools
codegen:
go install ./cmd/protoc-gen-go-protobq
find . -type f \( -name '*.pb.go' -or -name '*.protobq.go' \) -delete
buf generate
go tool buf generate
Loading
Loading