Browse Source

run metalinter in make test and run_test.sh

pull/703/head
Ethan Buchman 7 years ago
parent
commit
d9c87a21a6
3 changed files with 9 additions and 5 deletions
  1. +5
    -4
      Makefile
  2. +0
    -1
      circle.yml
  3. +4
    -0
      test/run_test.sh

+ 5
- 4
Makefile View File

@ -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
@gometalinter --install
metalinter:
@gometalinter --vendor --deadline=600s --enable-all --disable=lll ./... @gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
metalinter_test: ensure_tools
@gometalinter --install
metalinter_test:
@gometalinter --vendor --deadline=600s --disable-all \ @gometalinter --vendor --deadline=600s --disable-all \
--enable=deadcode \ --enable=deadcode \
--enable=gas \ --enable=gas \


+ 0
- 1
circle.yml View File

@ -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:


+ 4
- 0
test/run_test.sh View File

@ -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…
Cancel
Save