seperate linting from testing
This commit is contained in:
parent
4a69e1ad15
commit
b335661363
13
.travis.yml
13
.travis.yml
|
@ -23,8 +23,12 @@ matrix:
|
|||
sudo: required
|
||||
- os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
sudo: false
|
||||
env: RUN_UI_TESTS=1 SKIP_NOMAD_TESTS=1
|
||||
- os: linux
|
||||
dist: trusty
|
||||
sudo: false
|
||||
env: RUN_STATIC_CHECKS=1 SKIP_NOMAD_TESTS=1
|
||||
- os: osx
|
||||
osx_image: xcode9.1
|
||||
|
||||
|
@ -34,11 +38,12 @@ cache:
|
|||
- ui/node_modules
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo -E bash ./scripts/travis-mac-priv.sh ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo -E bash ./scripts/travis-linux.sh ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-mac-priv.sh ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-linux.sh ; fi
|
||||
|
||||
install:
|
||||
- make bootstrap
|
||||
- if [[ -z "$SKIP_NOMAD_TESTS" ]]; then make deps ; fi
|
||||
- if [[ "$RUN_STATIC_CHECKS" ]]; then make lint-deps ; fi
|
||||
|
||||
script:
|
||||
- sudo -E "PATH=$PATH" make travis
|
||||
|
|
17
GNUmakefile
17
GNUmakefile
|
@ -132,25 +132,24 @@ endef
|
|||
# Reify the package targets
|
||||
$(foreach t,$(ALL_TARGETS),$(eval $(call makePackageTarget,$(t))))
|
||||
|
||||
# Only for Travis CI compliance
|
||||
.PHONY: bootstrap
|
||||
bootstrap: deps
|
||||
bootstrap: deps lint-deps # Install all dependencies
|
||||
|
||||
.PHONY: deps
|
||||
deps: ## Install build and development dependencies
|
||||
deps: ## Install build and development dependencies
|
||||
@echo "==> Updating build dependencies..."
|
||||
go get -u github.com/alecthomas/gometalinter
|
||||
gometalinter --install
|
||||
go get -u github.com/kardianos/govendor
|
||||
go get -u golang.org/x/tools/cmd/cover
|
||||
go get -u github.com/axw/gocov/gocov
|
||||
go get -u gopkg.in/matm/v1/gocov-html
|
||||
go get -u github.com/ugorji/go/codec/codecgen
|
||||
go get -u github.com/jteeuwen/go-bindata/...
|
||||
go get -u github.com/elazarl/go-bindata-assetfs/...
|
||||
go get -u github.com/hashicorp/vault
|
||||
go get -u github.com/a8m/tree/cmd/tree
|
||||
|
||||
.PHONY: lint-deps
|
||||
lint-deps: ## Install linter dependencies
|
||||
@echo "==> Updating linter dependencies..."
|
||||
go get -u github.com/alecthomas/gometalinter
|
||||
gometalinter --install
|
||||
|
||||
.PHONY: check
|
||||
check: ## Lint the source code
|
||||
@echo "==> Linting source code..."
|
||||
|
|
|
@ -7,8 +7,13 @@ PING_LOOP_PID=$!
|
|||
|
||||
trap 'kill ${PING_LOOP_PID}' EXIT HUP INT QUIT TERM
|
||||
|
||||
make check
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make checkscripts ; fi
|
||||
if [[ "$RUN_STATIC_CHECKS" ]]; then
|
||||
make check
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
make checkscripts
|
||||
fi
|
||||
fi
|
||||
|
||||
make test
|
||||
TEST_OUTPUT=$?
|
||||
|
||||
|
|
Loading…
Reference in New Issue