From dd0df19c162a7f4e5c4da95899f3768505db7b72 Mon Sep 17 00:00:00 2001 From: Alexandre Perrin Date: Tue, 22 Jun 2021 13:20:08 +0200 Subject: [PATCH] ci: fix the go vendoring check Before this patch, git diff was used to ensure that Go modules were properly vendored. While it could catch a failure to update a vendored module, it would not fail when a module was not vendored (untracked). This patch uses git status instead of git diff, effectively catching untracked vendored modules as well. Signed-off-by: Alexandre Perrin --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6cad9b335c..d1d1e1d920 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -49,7 +49,7 @@ jobs: go mod tidy go mod vendor go mod verify - git diff --exit-code + test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1) - name: Build run: make