run metalinter in make test and run_test.sh

This commit is contained in:
Ethan Buchman 2017-11-27 22:38:48 +00:00
parent 2e76b23c9a
commit d9c87a21a6
3 changed files with 9 additions and 5 deletions

View File

@ -26,6 +26,8 @@ dist:
@BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
test:
@echo "--> Running linter"
@make metalinter_test
@echo "--> Running go test"
@go test $(PACKAGES)
@ -77,15 +79,14 @@ tools:
ensure_tools:
go get $(GOTOOLS)
@gometalinter --install
### Formatting, linting, and vetting
metalinter: ensure_tools
@gometalinter --install
metalinter:
@gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
metalinter_test: ensure_tools
@gometalinter --install
metalinter_test:
@gometalinter --vendor --deadline=600s --disable-all \
--enable=deadcode \
--enable=gas \

View File

@ -24,7 +24,6 @@ dependencies:
test:
override:
- cd "$PROJECT_PATH" && make get_vendor_deps && make metalinter_test
- cd "$PROJECT_PATH" && set -o pipefail && make test_integrations 2>&1 | tee test_integrations.log:
timeout: 1800
post:

View File

@ -6,6 +6,10 @@ pwd
BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: $BRANCH"
# run the linter
# TODO: drop the `_test` once we're ballin' enough
make metalinter_test
# run the go unit tests with coverage
bash test/test_cover.sh