From b5c70cc206171bbaf7a3eeceee8ae33a3683b8f8 Mon Sep 17 00:00:00 2001 From: silenceper Date: Wed, 24 Jun 2020 14:19:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20golangci-lint=20actions=20?= =?UTF-8?q?(#268)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update go.yml --- .github/workflows/go.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 93497a1..ab6b1b2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 ./...