Add DCO check to travis
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
4f2b443a27
commit
75705d26d1
2 changed files with 11 additions and 1 deletions
|
@ -19,11 +19,13 @@ install:
|
||||||
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip -O /tmp/protoc-3.1.0-linux-x86_64.zip
|
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip -O /tmp/protoc-3.1.0-linux-x86_64.zip
|
||||||
- unzip -o -d /tmp/protobuf /tmp/protoc-3.1.0-linux-x86_64.zip
|
- unzip -o -d /tmp/protobuf /tmp/protoc-3.1.0-linux-x86_64.zip
|
||||||
- export PATH=$PATH:/tmp/protobuf/bin/
|
- export PATH=$PATH:/tmp/protobuf/bin/
|
||||||
|
- go get -u github.com/vbatts/git-validation
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make fmt
|
- make fmt
|
||||||
- make binaries
|
- make binaries
|
||||||
- make coverage
|
- make coverage
|
||||||
|
- TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make dco
|
||||||
- sudo PATH=$PATH GOPATH=$GOPATH make root-coverage
|
- sudo PATH=$PATH GOPATH=$GOPATH make root-coverage
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -23,7 +23,7 @@ GO_LDFLAGS=-ldflags "-X $(PKG).Version=$(VERSION) -X $(PKG).Package=$(PKG)"
|
||||||
# Flags passed to `go test`
|
# Flags passed to `go test`
|
||||||
TESTFLAGS ?=-parallel 8 -race
|
TESTFLAGS ?=-parallel 8 -race
|
||||||
|
|
||||||
.PHONY: clean all AUTHORS fmt vet lint build binaries test integration setup generate protos checkprotos coverage ci check help install uninstall vendor
|
.PHONY: clean all AUTHORS fmt vet lint dco build binaries test integration setup generate protos checkprotos coverage ci check help install uninstall vendor
|
||||||
.DEFAULT: default
|
.DEFAULT: default
|
||||||
|
|
||||||
all: binaries
|
all: binaries
|
||||||
|
@ -77,6 +77,14 @@ lint: ## run go lint
|
||||||
@echo "🐳 $@"
|
@echo "🐳 $@"
|
||||||
@test -z "$$(golint ./... | grep -v vendor/ | grep -v ".pb.go:" | tee /dev/stderr)"
|
@test -z "$$(golint ./... | grep -v vendor/ | grep -v ".pb.go:" | tee /dev/stderr)"
|
||||||
|
|
||||||
|
dco: ## dco check
|
||||||
|
@which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found" && false)
|
||||||
|
ifdef TRAVIS_COMMIT_RANGE
|
||||||
|
git-validation -q -run DCO,short-subject,dangling-whitespace
|
||||||
|
else
|
||||||
|
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
|
||||||
|
endif
|
||||||
|
|
||||||
ineffassign: ## run ineffassign
|
ineffassign: ## run ineffassign
|
||||||
@echo "🐳 $@"
|
@echo "🐳 $@"
|
||||||
@test -z "$$(ineffassign . | grep -v vendor/ | grep -v ".pb.go:" | tee /dev/stderr)"
|
@test -z "$$(ineffassign . | grep -v vendor/ | grep -v ".pb.go:" | tee /dev/stderr)"
|
||||||
|
|
Loading…
Reference in a new issue