Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
ci: adds check to ensure go modules are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
poy committed May 9, 2019
1 parent 9fa652d commit d74b935
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ script:
- go install github.com/golang/mock/mockgen
- ./ci/check_go_fmt.sh
- ./ci/check_go_generate.sh
- ./ci/check_go_mod.sh
- go test -v ./...
13 changes: 13 additions & 0 deletions ci/check_go_mod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# This script is used to ensure that the go.mod file is up to date.

set -euo pipefail

go mod tidy

if [ ! -z "$(git status --porcelain)" ]; then
git status
echo
echo "The go.mod is not up to date."
exit 1
fi

0 comments on commit d74b935

Please # to comment.