Skip to content

Commit

Permalink
Enable go lint in travis (#115)
Browse files Browse the repository at this point in the history
Enable go lint in travis

Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
  • Loading branch information
feiskyer authored and shettyg committed Apr 29, 2017
1 parent f5f7c04 commit 10bd11f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
sudo: false
sudo: required
language: python
python:
- "2.7"
env:
- TOX_ENV=py27
- TOX_ENV=flake8
install: pip install tox-travis
script: tox -e $TOX_ENV
before_install:
- export GOPATH=$HOME/go
- export PATH=$HOME/usr/local/go/bin:$GOPATH/bin:$PATH
- mkdir -p $GOPATH/src/github.com/openvswitch
- mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openvswitch/ovn-kubernetes
- cd $GOPATH/src/github.com/openvswitch/ovn-kubernetes
install:
- pip install tox-travis
- eval "$(gimme 1.8.1)"
script:
- tox -e $TOX_ENV
- cd go-controller
- make
- make gofmt
- make install.tools
- make lint
2 changes: 1 addition & 1 deletion go-controller/hack/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ for d in $(find . -type d -not -iwholename '*.git*' -a -not -iname '.tool' -a -n
--cyclo-over=60 \
--dupl-threshold=100 \
--tests \
--deadline=30s "${d}"
--deadline=240s "${d}"
done

0 comments on commit 10bd11f

Please sign in to comment.