Add linters to CI

This commit is contained in:
Brian Goff
2018-09-24 10:03:24 -07:00
parent 317e6e9ea1
commit 5be552bb85
2 changed files with 36 additions and 5 deletions

View File

@@ -1,10 +1,24 @@
version: 2
jobs:
build:
validate:
docker:
# specify the version
- image: circleci/golang:1.10
working_directory: /go/src/github.com/virtual-kubelet/virtual-kubelet
steps:
- checkout
- run:
name: Install linters
command: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.10.2 && mv ./bin/* /go/bin/
- run:
name: Lint
command: golangci-lint run --new-from-rev "HEAD~$(git rev-list master.. --count)" ./...
- run:
name: Dependencies
command: scripts/validate/dep.sh
test:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/virtual-kubelet/virtual-kubelet
steps:
- checkout
@@ -15,12 +29,16 @@ jobs:
echo 'export AZURE_AUTH_LOCATION=${outputPathCredsfile}' >> $BASH_ENV
- run: |
echo 'export KUBECONFIG=${outputPathKubeConfigFile}' >> $BASH_ENV
- run:
name: Dependencies
command: scripts/validate/dep.sh
- run:
name: Build
command: V=1 make build
- run:
name: Tests
command: V=1 CI=1 SKIP_AWS_E2E=1 make test
workflows:
version: 2
validate_and_test:
jobs:
- validate
- test