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

use go tool to invoke tools #86

Merged
merged 1 commit into from
Dec 17, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: go build ./...

- name: Go Lint
run: go run github.com/golangci/golangci-lint/cmd/golangci-lint run ./...
run: go tool golangci-lint run ./...

- name: Go Test
run: go test -v -count=1 -race -shuffle=on ./...
Expand All @@ -56,7 +56,7 @@ jobs:
run: go test -v -shuffle=on -run=- -bench=. -benchtime=1x ./...

- name: Go Vuln Check
run: go run golang.org/x/vuln/cmd/govulncheck -test ./...
run: go tool govulncheck -test ./...

- name: Go Deadcode
run: if [ -n "`go run golang.org/x/tools/cmd/deadcode ./...`" ]; then exit 1; fi
run: if [ -n "`go tool deadcode ./...`" ]; then exit 1; fi
6 changes: 3 additions & 3 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: actions/checkout@v4

- name: Check proto diff
run: go run github.com/bufbuild/buf/cmd/buf generate proto && git diff --exit-code
run: go tool buf generate proto && git diff --exit-code

- name: Buf lint
run: go run github.com/bufbuild/buf/cmd/buf lint proto
run: go tool buf lint proto

- name: Buf breaking
run: go run github.com/bufbuild/buf/cmd/buf breaking proto --against "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,subdir=proto"
run: go tool buf breaking proto --against "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,subdir=proto"
4 changes: 2 additions & 2 deletions .github/workflows/sqlc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- name: Run sqlc diff
run: find . -name sqlc.yaml | xargs go run github.com/sqlc-dev/sqlc/cmd/sqlc diff -f
run: find . -name sqlc.yaml | xargs go tool sqlc diff -f

- name: Run sqlc vet
run: find . -name sqlc.yaml | xargs go run github.com/sqlc-dev/sqlc/cmd/sqlc vet -f
run: find . -name sqlc.yaml | xargs go tool sqlc vet -f
Loading