mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
update travis to do more static checks
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
parent
1f3b32085c
commit
0fc294ae5b
32
.travis.yml
32
.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:
|
||||
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/)
|
||||
|
||||
script:
|
||||
- gometalinter --deadline=10m -j 4 --enable=misspell --enable=staticcheck --vendor ./...
|
||||
- test -z $(gofmt -s -l $GO_FILES)
|
||||
- name: rbdplugin
|
||||
script:
|
||||
- make rbdplugin
|
||||
|
||||
- name: cephfsplugin
|
||||
script:
|
||||
- make cephfsplugin
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
script:
|
||||
- ./deploy.sh
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
all_branches: true
|
||||
script: ./deploy.sh
|
||||
|
Loading…
Reference in New Issue
Block a user