Browse Source

check vendor folder (#6006)

* check vendor in circleci

* make vendor checking step more descriptive

* reorganize check-vendor and gofmt jobs
pull/6219/head
Alvin Huang 5 years ago committed by GitHub
parent
commit
54ef3d5a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      .circleci/config.yml

29
.circleci/config.yml

@ -60,6 +60,29 @@ jobs:
environment:
<<: *ENVIRONMENT
# checks vendor directory is correct
check-vendor:
docker:
- image: *GOLANG_IMAGE
environment:
<<: *ENVIRONMENT
steps:
- checkout
- restore_cache:
keys:
- consul-modcache-v1-{{ checksum "go.mod" }}
- run:
command: make update-vendor
- save_cache:
key: consul-modcache-v1-{{ checksum "go.mod" }}
paths:
- /go/pkg/mod
- run: |
if ! git diff --exit-code; then
echo "Git directory has vendor changes"
exit 1
fi
go-test:
docker:
- image: *GOLANG_IMAGE
@ -454,11 +477,13 @@ workflows:
version: 2
go-tests:
jobs:
- check-vendor
- lint-consul-retry
- go-fmt-and-vet
- go-fmt-and-vet:
requires:
- check-vendor
- dev-build:
requires:
- lint-consul-retry
- go-fmt-and-vet
- go-test: &go-test
requires:

Loading…
Cancel
Save