1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 21:02:25 +08:00

增加 golangci-lint actions (#268)

* Update go.yml
This commit is contained in:
silenceper
2020-06-24 14:19:48 +08:00
committed by GitHub
parent 69d0b94fdf
commit b5c70cc206

View File

@@ -28,23 +28,13 @@ jobs:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.26
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Lint Go Code
run: |
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
go get -u golang.org/x/lint/golint
go vet ./...
golint -set_exit_status $(go list ./...)
- name: Test
run: go test -v -race ./...