mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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
30
.travis.yml
30
.travis.yml
@ -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
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- name: Linter
|
||||||
install:
|
install:
|
||||||
|
- gem install mdl
|
||||||
|
- pip install --user --upgrade pip
|
||||||
|
- pip install --user yamllint
|
||||||
# install gometalinter
|
# install gometalinter
|
||||||
- curl -L
|
- curl -L
|
||||||
"https://raw.githubusercontent.com/alecthomas/gometalinter/"${GO_METALINTER_VERSION}"/scripts/install.sh"
|
"https://raw.githubusercontent.com/alecthomas/gometalinter/"${GO_METALINTER_VERSION}"/scripts/install.sh"
|
||||||
| bash -s -- -b $GOPATH/bin "${GO_METALINTER_VERSION}"
|
| bash -s -- -b $GOPATH/bin "${GO_METALINTER_VERSION}"
|
||||||
|
|
||||||
before_script:
|
|
||||||
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/)
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- gometalinter --deadline=10m -j 4 --enable=misspell --enable=staticcheck --vendor ./...
|
- scripts/lint-text.sh --require-all
|
||||||
- test -z $(gofmt -s -l $GO_FILES)
|
- scripts/lint-go.sh
|
||||||
|
- scripts/test-go.sh
|
||||||
|
|
||||||
|
- name: rbdplugin
|
||||||
|
script:
|
||||||
- make rbdplugin
|
- make rbdplugin
|
||||||
|
|
||||||
|
- name: cephfsplugin
|
||||||
|
script:
|
||||||
- make cephfsplugin
|
- 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
|
||||||
|
Loading…
Reference in New Issue
Block a user