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
42
.travis.yml
42
.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
|
||||
|
Loading…
Reference in New Issue
Block a user