From bd2d50c652d8c67248a46e14f468e6551ba5f4e6 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 5 Feb 2021 16:22:59 +0800 Subject: [PATCH] use golangci lint, rm incompatible action secure go (#172) --- .github/workflows/golangci-lint.yml | 19 ++++++++++++++++ .github/workflows/static_check.yml | 4 ---- .travis.yml | 34 ----------------------------- 3 files changed, 19 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/golangci-lint.yml delete mode 100755 .travis.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 00000000..9640ae5a --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,19 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + pull_request: +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.29 + args: --skip-dirs=examples --out-format=colored-line-number --skip-files=.*_test.go$ \ No newline at end of file diff --git a/.github/workflows/static_check.yml b/.github/workflows/static_check.yml index f7ae0bf2..1b5c3608 100644 --- a/.github/workflows/static_check.yml +++ b/.github/workflows/static_check.yml @@ -31,10 +31,6 @@ jobs: steps: - name: Checkout Source uses: actions/checkout@v2 - - name: Run Gosec Security Scanner - uses: securego/gosec@master - with: - args: ./... - name: Fmt run: | bash scripts/ci/formatChecker.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 8e829677..00000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -language: go -sudo: required -go: - - 1.13 -install: true - - -jobs: - include: - - stage: Unit Test - script: - - export GOPROXY=https://goproxy.io - - GO111MODULE=on go mod download - - GO111MODULE=on go mod vendor - - bash scripts/travis/start_deps.sh - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cmd/cover - - sleep 30 - - bash scripts/travis/unit_test.sh && $HOME/gopath/bin/goveralls -coverprofile=coverage.txt -service=travis-ci