Use GitHub action for golangci-lint

This commit is contained in:
Dmitrii Okunev 2021-06-25 13:20:59 +01:00
parent 503df04b99
commit a9c0ac4f5d
2 changed files with 19 additions and 1 deletions

View File

@ -15,7 +15,6 @@ jobs:
# specify any bash command here prefixed with `run: `
- run: GO111MODULE=off go get github.com/tjfoc/gmsm/sm2 github.com/dustin/go-humanize github.com/linuxboot/fiano/pkg/uefi && go run ./pkg/intel/metadata/manifest/common/manifestcodegen/cmd/manifestcodegen -check ./pkg/intel/metadata/manifest ./pkg/intel/metadata/manifest/bootpolicy ./pkg/intel/metadata/manifest/key
- run: if [ "$(gofmt -l .)" != "" ]; then exit 1; fi
- run: golangci-lint run ./pkg/...
- run: golint -set_exit_status ./cmd/txt-suite
- run: golint -set_exit_status ./cmd/txt-prov
- run: golint -set_exit_status ./cmd/cbnt-prov

19
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
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:
working-directory: pkg