update travis to do more static checks

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
Madhu Rajanna 2019-02-07 15:28:09 +05:30 committed by mergify[bot]
parent 1f3b32085c
commit 0fc294ae5b

View File

@ -1,3 +1,4 @@
---
# need for docker build # need for docker build
sudo: true sudo: true
@ -12,25 +13,36 @@ go: 1.11.x
env: env:
global: global:
- GO_METALINTER_VERSION="v3.0.0" - GO_METALINTER_VERSION="v3.0.0"
- TEST_COVERAGE=stdout
- GO_METALINTER_THREADS=1
- GO_COVER_DIR=_output
install: jobs:
# install gometalinter include:
- curl -L - name: Linter
"https://raw.githubusercontent.com/alecthomas/gometalinter/"${GO_METALINTER_VERSION}"/scripts/install.sh" install:
| bash -s -- -b $GOPATH/bin "${GO_METALINTER_VERSION}" - gem install mdl
- pip install --user --upgrade pip
- pip install --user yamllint
# install gometalinter
- curl -L
"https://raw.githubusercontent.com/alecthomas/gometalinter/"${GO_METALINTER_VERSION}"/scripts/install.sh"
| bash -s -- -b $GOPATH/bin "${GO_METALINTER_VERSION}"
script:
- scripts/lint-text.sh --require-all
- scripts/lint-go.sh
- scripts/test-go.sh
before_script: - name: rbdplugin
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) script:
- make rbdplugin
script: - name: cephfsplugin
- gometalinter --deadline=10m -j 4 --enable=misspell --enable=staticcheck --vendor ./... script:
- test -z $(gofmt -s -l $GO_FILES) - make cephfsplugin
- make rbdplugin
- make cephfsplugin
deploy: deploy:
- provider: script - provider: script
script: on: # yamllint disable-line rule:truthy
- ./deploy.sh
on:
all_branches: true all_branches: true
script: ./deploy.sh