summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-11-18 16:03:51 +0100
committerStefan Haller <stefan@haller-berlin.de>2023-11-18 16:03:51 +0100
commit1b4e76797f2a9ba52f6d5db0c677f9ea30ecd4f6 (patch)
tree6b8ba89e2ccc257ba0f562ac3c7532968f8d3b5e
parent58971182cae5da745594295566e5eaa7c2f7c320 (diff)
Add "go mod tidy" check to CI
This should catch errors like this earlier.
-rw-r--r--.github/workflows/ci.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d5d5651ff..247dbe68b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -131,6 +131,10 @@ jobs:
# ensure our vendor directory matches up with our go modules
run: |
go mod vendor && git diff --exit-code || (echo "Unexpected change to vendor directory. Run 'go mod vendor' locally and commit the changes" && exit 1)
+ - name: Check go.mod file
+ # ensure our go.mod file is clean
+ run: |
+ go mod tidy && git diff --exit-code || (echo "go.mod file is not clean. Run 'go mod tidy' locally and commit the changes" && exit 1)
- name: Check All Auto-Generated Files
# ensure all our auto-generated files are up to date
run: |