From 6360fe8a8f3bac107e8f281f2c7874e364c4c6e8 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 20 Dec 2019 10:49:03 +0100 Subject: [PATCH] ci: Require go.mod to be tidy This helps us prevent accidentally having an inconsistent go.mod file after changes to dependencies. --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40e588197..d71184145 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,6 +45,9 @@ jobs: run: go build ./... - name: Vet run: go vet ./... + - name: Check go.mod Tidiness + run: go mod tidy && git diff --exit-code + if: ${{ matrix.go == '1.16' }} - name: Test run: go test ./... - name: Test (race)