run metalinter in make test and run_test.sh
This commit is contained in:
parent
2e76b23c9a
commit
d9c87a21a6
9
Makefile
9
Makefile
|
@ -26,6 +26,8 @@ dist:
|
||||||
@BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
|
@BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
@echo "--> Running linter"
|
||||||
|
@make metalinter_test
|
||||||
@echo "--> Running go test"
|
@echo "--> Running go test"
|
||||||
@go test $(PACKAGES)
|
@go test $(PACKAGES)
|
||||||
|
|
||||||
|
@ -77,15 +79,14 @@ tools:
|
||||||
|
|
||||||
ensure_tools:
|
ensure_tools:
|
||||||
go get $(GOTOOLS)
|
go get $(GOTOOLS)
|
||||||
|
@gometalinter --install
|
||||||
|
|
||||||
### Formatting, linting, and vetting
|
### Formatting, linting, and vetting
|
||||||
|
|
||||||
metalinter: ensure_tools
|
metalinter:
|
||||||
@gometalinter --install
|
|
||||||
@gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
|
@gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
|
||||||
|
|
||||||
metalinter_test: ensure_tools
|
metalinter_test:
|
||||||
@gometalinter --install
|
|
||||||
@gometalinter --vendor --deadline=600s --disable-all \
|
@gometalinter --vendor --deadline=600s --disable-all \
|
||||||
--enable=deadcode \
|
--enable=deadcode \
|
||||||
--enable=gas \
|
--enable=gas \
|
||||||
|
|
|
@ -24,7 +24,6 @@ dependencies:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
override:
|
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:
|
- cd "$PROJECT_PATH" && set -o pipefail && make test_integrations 2>&1 | tee test_integrations.log:
|
||||||
timeout: 1800
|
timeout: 1800
|
||||||
post:
|
post:
|
||||||
|
|
|
@ -6,6 +6,10 @@ pwd
|
||||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
echo "Current branch: $BRANCH"
|
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
|
# run the go unit tests with coverage
|
||||||
bash test/test_cover.sh
|
bash test/test_cover.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue