Run go mod tidy as part of GitHub actions

Make sure go.mod and go.sum match the current source in the module.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
Tobias Klauser
2021-03-18 12:08:34 -07:00
committed by Brad Fitzpatrick
parent 738f593fd1
commit 4259e17bb7
2 changed files with 6 additions and 4 deletions
+6
View File
@@ -29,5 +29,11 @@ jobs:
if: matrix.go-version == '1.16' && matrix.platform == 'ubuntu-latest'
run: diff -u <(echo -n) <(go fmt $(go list ./...))
- name: Check Go modules
if: matrix.go-version == '1.16'
run: |
go mod tidy
git diff --exit-code
- name: Run unit tests
run: go test -v ./...