blob: b977042d8e2c109dcea28bb9e8c78cb57b349208 [file] [log] [blame]
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.51.2
args: --enable gofmt,gocyclo,goimports,dupl,gosec --timeout 5m --skip-dirs=examples,test --skip-files=.*_test.go$
static-checks:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.18
id: go
- name: Checkout Source
uses: actions/checkout@v2
- name: Fmt
run: |
bash scripts/ci/formatChecker.sh
- name: Misspell
run: |
go get -u github.com/client9/misspell/cmd/misspell
bash scripts/ci/formatChecker.sh
- name: Lint
run: |
go get -u golang.org/x/lint/golint
bash scripts/ci/goLintChecker.sh
- name: Cyclo
run: |
go get github.com/fzipp/gocyclo
bash scripts/ci/goCycloChecker.sh