Skip to content

Commit

Permalink
ci: several cleanup for go linter (#59)
Browse files Browse the repository at this point in the history
Address comments of
#57.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

Signed-off-by: Ziwen Ning <[email protected]>
  • Loading branch information
ningziwen authored Jul 20, 2023
1 parent 2d5797b commit cfc2297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:
jobs:
# It's recommended to run golangci-lint in a job separate from other jobs (go test, etc) because different jobs run in parallel.
go-linter:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: true
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -51,7 +52,6 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
# TODO: Use `go mod tidy --check` after https://github.com/golang/go/issues/27005 is fixed.
- run: go mod tidy
- run: git diff --exit-code
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lint: $(SOURCES)
.get-deps-stamp:
GO111MODULE=off GOBIN=$(DEPSPATH) go get golang.org/x/tools/cmd/goimports
GOBIN=$(DEPSPATH) go get github.com/golang/mock/[email protected]
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(DEPSPATH) v1.52.2
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(DEPSPATH) v1.53.3
$(DEPSPATH)/golangci-lint --version
touch .get-deps-stamp

Expand Down

0 comments on commit cfc2297

Please sign in to comment.