Merge pull request #77 from hasheddan/gomodfailci

Check for dirty go modules in CI
This commit is contained in:
Nic Cope 2019-11-12 12:43:56 -08:00 committed by GitHub
commit 8686ab0b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

1
Jenkinsfile vendored
View File

@ -45,6 +45,7 @@ pipeline {
}
}
steps {
sh './build/run make check-diff'
sh './build/run make vendor.check'
sh './build/run make -j\$(nproc) build.all'
}

View File

@ -58,7 +58,14 @@ cobertura:
$(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml
# Ensure a PR is ready for review.
reviewable: vendor generate lint
reviewable: generate lint
@go mod tidy
# Ensure branch is clean.
check-diff: reviewable
@$(INFO) checking that branch is clean
@git diff --quiet || $(FAIL)
@$(OK) branch is clean
# Update the submodules, such as the common build scripts.
submodules: