mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Use golangci-lint github action
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -50,9 +50,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-go@v2.1.5
|
||||
with:
|
||||
go-version: 1.15
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- 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
|
||||
|
17
Makefile
17
Makefile
@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user