Skip to content

Commit

Permalink
Github Action should use the same lint command as local
Browse files Browse the repository at this point in the history
  • Loading branch information
alok87 committed Aug 26, 2022
1 parent 6ce4071 commit a913f31
Showing 1 changed file with 16 additions and 33 deletions.
49 changes: 16 additions & 33 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,22 @@ on: [ push, pull_request ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
go-versions: [ 1.16.x, 1.17.x, 1.18.x, 1.19.x ]
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: setup Docker
uses: docker-practice/actions-setup-docker@master
with:
docker_version: ${{ matrix.docker_version }}
docker_channel: ${{ matrix.docker_channel }}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
# version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# golangci-lint command line arguments.
args:
-v
--max-same-issues 10
--disable-all
--exclude-use-default=false
-E asciicheck
-E deadcode
-E errcheck
-E forcetypeassert
-E gocritic
-E gofmt
-E goimports
-E gosimple
-E govet
-E ineffassign
-E misspell
-E revive
-E staticcheck
-E structcheck
-E typecheck
-E unused
-E varcheck
- name: Lint code
run: make lint

0 comments on commit a913f31

Please sign in to comment.