add "go mod tidy" CI check

pulled this from IDK... we just had an issue where we had an unused
dep in go.mod.
This commit is contained in:
Matthew Jaffee 2022-03-01 16:32:53 -06:00
parent 63c3a8b761
commit 0dc5aed8d7

View file

@ -36,6 +36,15 @@ golangci-lint:
- echo "Checking for issues in new code"
- golangci-lint run
go mod tidy:
stage: lint
image: golang:$GOVERSION
rules:
- if: '$CI_COMMIT_TAG == null && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
script:
- go mod tidy
- git diff --exit-code -- go.mod go.sum
build lattice:
stage: test
image: node:14