move lint to gh action
This commit is contained in:
parent
7d410b74c5
commit
6781e23c3b
2 changed files with 4 additions and 13 deletions
11
.github/workflows/go.yml
vendored
11
.github/workflows/go.yml
vendored
|
|
@ -26,22 +26,19 @@ jobs:
|
|||
- name: Dep
|
||||
run: |
|
||||
set -e
|
||||
|
||||
go version
|
||||
go install golang.org/x/lint/golint
|
||||
go install github.com/gordonklaus/ineffassign
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -e
|
||||
|
||||
go build -tags pam -o sshpiperd
|
||||
go build -o sshpiperd
|
||||
./sshpiperd version
|
||||
working-directory: sshpiperd
|
||||
|
||||
- name: lint
|
||||
run: ./lint.sh
|
||||
|
||||
- name: Test
|
||||
run: go test -v .
|
||||
working-directory: sshpiperd
|
||||
|
|
|
|||
6
lint.sh
6
lint.sh
|
|
@ -2,15 +2,9 @@
|
|||
|
||||
set -e
|
||||
|
||||
pkgs="./libpiper/... ./sshpiperd/..."
|
||||
|
||||
gofmt -s -l libpiper sshpiperd
|
||||
|
||||
go vet ./...
|
||||
go fix ./...
|
||||
|
||||
for p in $pkgs; do
|
||||
golint $p
|
||||
done
|
||||
|
||||
ineffassign ./...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue