Use golangci-lint github action

This commit is contained in:
Maksym Pavlenko
2021-12-31 14:26:34 +02:00
parent 24aed6684c
commit 1620697708
2 changed files with 4 additions and 20 deletions
+3 -4
View File
@@ -50,9 +50,10 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: actions/[email protected]
- uses: golangci/golangci-lint-action@v2
with:
version: v1.43.0
- name: Go mod
env:
@@ -68,5 +69,3 @@ jobs:
echo
exit 1
fi
- run: make lint
+1 -16
View File
@@ -1,8 +1,7 @@
BINPATH := $(abspath ./bin)
GOLANGCI := $(BINPATH)/golangci-lint
.PHONY: all
all: build lint test
all: build test
#
# Build Podsync CLI binary
@@ -20,20 +19,6 @@ docker:
docker build -t $(TAG) .
docker push $(TAG)
#
# Pull GolangCI-Lint dependency
#
$(GOLANGCI):
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BINPATH) v1.31.0
$(GOLANGCI) --version
#
# Run linter
#
.PHONY: lint
lint: $(GOLANGCI)
$(GOLANGCI) run
#
# Run unit tests
#