diff --git a/.travis.yml b/.travis.yml index 729f3dc61..6590957fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +--- # need for docker build sudo: true @@ -12,25 +13,36 @@ go: 1.11.x env: global: - GO_METALINTER_VERSION="v3.0.0" + - TEST_COVERAGE=stdout + - GO_METALINTER_THREADS=1 + - GO_COVER_DIR=_output -install: - # install gometalinter - - curl -L - "https://raw.githubusercontent.com/alecthomas/gometalinter/"${GO_METALINTER_VERSION}"/scripts/install.sh" - | bash -s -- -b $GOPATH/bin "${GO_METALINTER_VERSION}" +jobs: + include: + - name: Linter + install: + - 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: - - GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) + - name: rbdplugin + script: + - make rbdplugin -script: - - gometalinter --deadline=10m -j 4 --enable=misspell --enable=staticcheck --vendor ./... - - test -z $(gofmt -s -l $GO_FILES) - - make rbdplugin - - make cephfsplugin + - name: cephfsplugin + script: + - make cephfsplugin deploy: - provider: script - script: - - ./deploy.sh - on: + on: # yamllint disable-line rule:truthy all_branches: true + script: ./deploy.sh