Skip to content

Commit

Permalink
ci: fix the go vendoring check
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kaworu authored and tklauser committed Jun 24, 2021
1 parent c171080 commit dd0df19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd0df19

Please sign in to comment.