From a6cb558cf16721ee790cd59583096e541cf7d524 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 29 Jun 2024 11:25:33 +0700 Subject: [PATCH] goLint: add a check that go.mod is tidied --- .github/workflows/goLint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/goLint.yml b/.github/workflows/goLint.yml index ab8bb88..d8ec18a 100644 --- a/.github/workflows/goLint.yml +++ b/.github/workflows/goLint.yml @@ -59,7 +59,15 @@ jobs: run: | git config --global url.https://${{ secrets.PAT }}@github.com/.insteadOf git+ssh://git@github.com git config --global url.git@github.com:.insteadOf https://github.com/ + - name: Check that go.mod is tidied + 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 - name: Run Linter + if: success() || failure() # run this step even if the previous one failed uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 with: version: v1.59.1