ci: use go mod tidy -diff to check for tidied go.mod (#5303)

This commit is contained in:
Marten Seemann
2025-08-24 18:27:56 +08:00
committed by GitHub
parent baf363b641
commit b126b42c8b

View File

@@ -20,12 +20,7 @@ jobs:
fi
- name: Check that go.mod is tidied
if: success() || failure() # run this step even if the previous one failed
run: |
cp go.mod go.mod.orig
cp go.sum go.sum.orig
go mod tidy
diff go.mod go.mod.orig
diff go.sum go.sum.orig
run: go mod tidy -diff
- name: Run code generators
if: success() || failure() # run this step even if the previous one failed
run: .github/workflows/go-generate.sh