From 11cb4ef2108de87ce82ecc5337d07692b8a825e6 Mon Sep 17 00:00:00 2001 From: eranharel Date: Tue, 5 Dec 2023 14:35:23 +0200 Subject: [PATCH] fix github actions --- .github/workflows/go.yaml | 14 ++++---------- .golangci.yml | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index edd9225..b5c9bf8 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -21,11 +21,8 @@ jobs: GOPROXY: "https://proxy.golang.org" run: go build . - - name: Install golangci-lint - run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0 - - - name: Run golangci-lint - run: golangci-lint run -E golint -E gosec -E gofmt + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 - name: Test env: @@ -64,11 +61,8 @@ jobs: GOPROXY: "https://proxy.golang.org" run: cd opencensus && go build . - - name: Install golangci-lint - run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0 - - - name: Run golangci-lint - run: cd opencensus && golangci-lint run -E golint -E gosec -E gofmt + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 - name: Test env: diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..f105257 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,19 @@ +# Refer to golangci-lint's example config file for more options and information: +# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml + +run: + timeout: 5m + modules-download-mode: readonly + +linters: + enable: + - errcheck + - goimports + - golint + - govet + - staticcheck + - gosec + - gofmt + +issues: + exclude-use-default: false