diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 61479bb565..ddc44777bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -59,3 +59,21 @@ jobs: with: input: "rpc/flipt" against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main" + + go-mod-tidy: + name: "Go Mod Tidy" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + cache: true + + - name: Run go mod tidy. + run: go mod tidy + + - name: Ensure clean git state. + run: git diff-index --quiet HEAD -- || (echo "Please run go mod tidy." && exit 1)