Skip to content

Commit

Permalink
enhance(dep): adds dep check in travis
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>

This commit adds `dep check` in travis which will allow catching broken dependencies PR.
  • Loading branch information
ashishranjan738 committed Mar 17, 2019
1 parent abe307f commit d42473b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ env:
- GO111MODULE=off

go:
- "1.11.4"
- "1.11.5"

before_install:
- go get github.com/mattn/goveralls
- go get github.com/rexray/gocsi/csc
- go get github.com/golang/dep/cmd/dep
- sudo apt update && sudo apt install procps -y # for installing pkill

script:
Expand Down
1 change: 1 addition & 0 deletions hack/verify-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ PKG_ROOT=$(git rev-parse --show-toplevel)
${PKG_ROOT}/hack/verify-gofmt.sh
${PKG_ROOT}/hack/verify-govet.sh
${PKG_ROOT}/hack/verify-golint.sh
${PKG_ROOT}/hack/verify-dep.sh
26 changes: 26 additions & 0 deletions hack/verify-dep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

echo "Verifying dep check"
git grep github.com/kubernetes-sigs/azuredisk-csi-driver/pkg/azuredisk
dep version
dep ensure -v
git status
dep check
echo "No issue found"

0 comments on commit d42473b

Please sign in to comment.