From 45cb0aacaba934acbe1a70b60fa0a50c707d69dc Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sun, 7 Mar 2021 14:17:16 +0800 Subject: [PATCH] run go vet and staticcheck in go-check --- workflow-templates/go-check.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/workflow-templates/go-check.yml b/workflow-templates/go-check.yml index 8fc46bf5..044c35ca 100644 --- a/workflow-templates/go-check.yml +++ b/workflow-templates/go-check.yml @@ -6,8 +6,14 @@ jobs: name: Go checks steps: - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@d9f0e73c0497685d68af8c58280f49fcaf0545ff # v2.5.1 + - uses: actions/setup-go@v2 with: - version: v1.33 - args: "--disable-all --enable gofmt,govet" + go-version: "1.16.x" + - name: go vet + run: go vet ./... + - name: staticcheck + if: ${{ success() || failure() }} + run: | + set -o pipefail + staticcheck ./... | sed -e "s/\(.*\)\.go/.\/\1.go/g" +