Skip to content

Commit 342ac53

Browse files
committed
Check go.mod and go.sum on BuildKite
Since Dependabot doesn't update these files. The failure is treated as a "soft" failure. https://github.com/dependabot/feedback/issues/215 Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 55bc739 commit 342ac53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ steps:
123123
soft_fail:
124124
- exit_status: "*"
125125

126+
- label: 'go mod tidy'
127+
commands:
128+
- 'go mod tidy'
129+
- test -z "$(git status --porcelain)" && exit 0 || git --no-pager diff && echo -e '\ngo.mod and/or go.sum differ from committed, please run "go mod tidy" and commit the updated files.\n' && exit 42
130+
soft_fail:
131+
- exit_status: 42 # Dependabot doesn't modify go.mod and go.sum
126132

127133
# This allows the cleanup step to always run, regardless of test failure
128134
- wait: ~

0 commit comments

Comments
 (0)